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...
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
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..
The rest would have to be scripted, which I presume, you were hoping for a ready made one and not advise on procedure.
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.
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.
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:
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
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?
I can't remember, I use my Bounding Containers for version 10.2.x, it works in 10.3 but I haven't posted the NumPy-ed version on ArcScript 2.0 Beta yet...sometime soon if it gets upgraded from Beta before the UC. It does Extent rectangles (your MBR), MABR, Minimum area Circle, convex hull of course and I have code not included for MPBR (not hard to alter MABR) and W.H. and I worked on MABE (min area bounding ellipse) but not posted. Will tidy it up with variants of Concave Hulls/Alpha Shapes plus some other esoteric containers of which there are many.
Retrieving data ...