I have two feature class... I ve to check whether Feature class 1 falls within the extent of the Feature Class2...
Is there any tool or procedure to check it using python script...
Interesting point. Not surprisingly, the documentation for the Extent object isn't very specific. Does the Extent object always return the minimum axis-aligned bounding rectangle or does/can it return a different minimum bounding rectangle in certain situations?
just to be careful, the Extent object usually defines the box/rectangle with axes parallel to the X and Y axes (talking 2D Euclidean space here). Minimum Bounding Rectangles (MBR) should be viewed in this context since the mathematically more interesting ones are the Minimum Area Bounding Rectangle (MABR) or perhaps the Minimum Perimeter Bounding Rectangle (MPBR). There is no guarantee, that MBR will equal MABR or MPBR. So the often missing 2nd word can be important as Darren is alluding to
To follow-up on what Darren Wiens suggests, the Extent object (obtained through the Describe object) got support for JSON and polygon properties at ArcGIS 10.3 (What's new in ArcGIS 10.3). Having the Extent object support polygon properties greatly eases working with them in situations like this one.
A couple of comments/thoughts:
It depends on your definition of "extent".
If you mean the encompassing rectangle around the entire feature class, you can Describe the Dataset to get the extent (see the example here).
If you just want the overlapping features, use Intersect.
If you write a script that adds both fc to a map document, you can use the arcpy.mapping module, you can return an layers extent with the layer.getExtent method. You might have to get a bit creative to determine a method for determining if one contains the other, but it should be possible.
The rest would have to be scripted, which I presume, you were hoping for a ready made one and not advise on procedure.
Thanks Dan.. I ve to report whether FC 1 falls within FC 2.. FC2 has a larger spatial extent.... The job is to check N no of FCs falls within the extent...We just want to automate the process... Kindly suggest..
There is no tool to check the whole feature classes at once, but you could determine the Minimum Bounding Geometry for each file, then get their extents and compare. you will have to decide which type of geometry is best suited for your purposes (maybe a convex hull). This is one quick way
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.