How to get top (or visibles) polygons in specific Layer with ArcObjects

561
1
02-16-2013 03:05 AM
Highlighted
New Contributor II
Hi everyone!

I need to create an ArcObjects function to get the top (or visibles) polygons in specific layer. It's possible? I have a Layer with a lot of polygons in the same area but i have to get the top or visibles. I think it's not possible using ISpatialFilter! 😞

Thank´s a lot!
Reply
0 Kudos
1 Reply
Highlighted
Regular Contributor III
All 3 of those features are visible; it's just that the merged feature is drawn last and hides the two smaller features that are in the same location.  There's no real way to tell which feature is "on top" but from my own observation it always appears to be the feature with the higher ObjectId.  My guess is that ArcMap renders the features in the order of their ObjectIds but I'm not certain that is always the case.  If you need to be able to identify the merged features from the original features within a feature layer then I would suggest adding a field to the layer's attribute table that holds this information.  You can then add an attribute query to your spatial filter in order to get the results you are looking for.
Reply
0 Kudos