A scripting newbie question...
I'd like to write a Python script for ArcGIS 10.x that would record the pixel value for all pixels in a raster. Furthermore, I'd like to only record a given value once in the results. For example, if there are 23 values of 180 overall, only record one instance of that value.
The raster (6017x7715) in question is 4-band so the results would have to include values for all pixels in each band, recorded separately by band. The Pixel Inspector tool (see image below) will show you the value per pixel (and surrounding pixels), but I'd like to record the values as described and save it in Excel or at the very least a .csv.
Any help and examples would be greatly appreciated. Thanks in advance.
EDIT: I've found this online and it seems to work toward what I need:
import arcpy raster = arcpy.Raster("m_4112013_ne_10_1_20100627.tif") array = arcpy.RasterToNumPyArray(raster) (height, width)=array.shape for row in range(0,height): for col in range(0,width): print str(row)+","+str(col)+":"+str(array.item(row,col))
Now I'm working on getting my output the way I want. Any comments?