我无法弄清楚下面第9行语法的错误。救命?在ArcMap中使用Python。
>>> for strName in rasterList:
... pRaster = arcpy.Raster(strName)
... pPoint = arcpy.Point(2256560.829028871, 908394.8188188977)
... if pRaster.name == "dem":
... myArray = arcpy.RasterToNumPyArray(pRaster, pPoint, 3, 3)
... (width, height)= myArray.shape
... for row in range(0,height):
... for col in range(0,width):
... print "["+ str(row) + ", " + str(col)+"]:"str(myArray.item(row,col))
...
Parsing error SyntaxError: invalid syntax (line 9)
答案 0 :(得分:1)
您错过print "["+ str(row) + ", " + str(col)+"]:"
和str(myArray.item(row,col))