Created
November 24, 2013 01:43
-
-
Save hallahan/7622346 to your computer and use it in GitHub Desktop.
trying to set values iteratively in numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import arcpy | |
import numpy | |
import math | |
from arcpy.sa import * | |
arcpy.CheckOutExtension('Spatial') | |
arcpy.env.overwriteOutput = True | |
cwd = os.getcwd() | |
srcPath = cwd + "\\src-img\\" | |
srcImgs = os.listdir(srcPath) | |
for img in srcImgs: | |
path = srcPath + img | |
arr = arcpy.RasterToNumPyArray(path) | |
i = 2000 | |
while i < 2100: | |
j = 2000 | |
while j < 2100: | |
arr[i][j] = 5 | |
++j | |
++i | |
print 'break point' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment