3

This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python.

Is it possible to find an image's height and width using arcpy and ArcGIS?

arcpy.Describe would seem like a logical place to start, but I can't see whether it returns the height and width properties. I looked at File Properties and Raster Dataset Properties - am I missing something obvious?

1 Answer 1

3
import arcpy

someRaster = arcpy.sa.Raster('TYPE HERE LINK TO YOUR RASTER')
someExtent = someRaster.extent

print someExtent

This should do it.

2

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.