1

I used the following code to get the pixel value of specific location of a DEM image (in GRID format):

import arcpy
from arcpy.sa import *
inRaster="C:\\data\\dem"
slop_temp=Slope(inRaster)
print slop_temp[1,1]

but got the following error:

TypeError: 'Raster' object has no attribute 'getitem'

I am using ArcGIS Desktop 10.8. and I want to have access to a cell (or cells) by the row and column number(and not by geographic coordinates)

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.