I have a polygon feature classs with millions of records, I need to find list of overlapping or intesecting polygons in the same feature class, how to do it efficiently, I need a code snippet for the same. Attached image and requirement in pictorial view.
I am interested in the same thing and didn't find anything answering the question so far.
However I have an idea which may work. If you can group your polygons that overlap into distinct groups, it may be possible to create multiple layers of the same feature class with a definition query on each layer.
For example I have polygons which I can classify into 15 types. I am fairly confident that within each type no polygon overlaps. It certainly shouldn't be the case.
However it is the correct that each type can and sometimes does overlap any of the other 15 types. As I need to make sure I do not have any polygons obscured I need to know which groups obscure other types. Once I know this I can then use hatched fills so the polygons underneath are visible.
To help with this I set up 15 layers with definition queries on and then do some select by location analysis. I use it to find any that intersect and also any which are within.
This may not help you, especially if you have many records of data which are not easily grouped.
In ArcObject, there is an interface called IRelationalOperatorNxM might help accopolish what you want. You need to have 2 geometry bags, each holds the same set of polygons from the same feature class. Call Overlaps method and you will have the relationresult.