Skip to content

Instantly share code, notes, and snippets.

@erochest
Created February 3, 2012 20:19
Show Gist options
  • Save erochest/1732226 to your computer and use it in GitHub Desktop.
Save erochest/1732226 to your computer and use it in GitHub Desktop.
Getting the extent for a layer in arcpy
desc = arcpy.Describe('poly_landmarks')
ext = desc.extent
ext.upperRight.x, ext.upperRight.y
# (-73.907820000000001, 40.882078)
ext.lowerRight.x, ext.lowerRight.y
# (-73.907820000000001, 40.679648)
ext.upperLeft.x, ext.upperLeft.y
# (-74.047184999999999, 40.882078)
ext.lowerLeft.x, ext.lowerLeft.y
# (-74.047184999999999, 40.679648)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment