What statement would i need to see minx, miny, maxx, maxy

1154
2
Jump to solution
01-06-2020 10:13 AM
RickHawkins
New Contributor II

I am trying to find the correct way to find the min and max values of a layer in ArcGIS. There are approx. 80 feeders and i have written a python script to show only 1 feeder at a time for that layer. What statement in python would i use to calculate this?

Thanks for any help

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Since the ArcPy mapping modules are significantly different between ArcMap and ArcGIS Pro, it is always good to specify what product you are using when talking about layers in ArcGIS.  Since you tagged it Python 2.7, I will assume you are working with ArcMap.  I suggest you take a look at Layer—Help | ArcGIS for Desktop if you haven't already.

Typically when working with layers, people commonly talk about xmin, xmax, ymin, and ymax in terms of the layer's extent.  I would use the getExtent method to return an Extent object and then access the max and min properties from it.

View solution in original post

0 Kudos
2 Replies
JoshuaBixby
MVP Esteemed Contributor

Since the ArcPy mapping modules are significantly different between ArcMap and ArcGIS Pro, it is always good to specify what product you are using when talking about layers in ArcGIS.  Since you tagged it Python 2.7, I will assume you are working with ArcMap.  I suggest you take a look at Layer—Help | ArcGIS for Desktop if you haven't already.

Typically when working with layers, people commonly talk about xmin, xmax, ymin, and ymax in terms of the layer's extent.  I would use the getExtent method to return an Extent object and then access the max and min properties from it.

0 Kudos
RickHawkins
New Contributor II

thanks a lot. i will look at how to implement the getExtent.

0 Kudos