My Environment
[INDENT]ArcEngine 9.3.X[/INDENT]
[INDENT]Visual Studio 2008[/INDENT]
[INDENT]VB.NET[/INDENT]
I have been scouring the forums and documentation for a way to do this.
Please refer to the attached image to follow along with my question.
I am looking for a way to compute the area of the overlapped portion of FeatureABC on AlphaLayer, by FeatureXYZ on BetaLayer.
I'll tell you below what I've examined so far. Please read that before answering, as this topic is very easily misunderstood.
I dont think a spatial query ISpatialFilter is appropriate for what I am looking for because that only tells me what RELATIONSHIP features share with each other, such as
FeatureABC intersects FeatureXYZ.
What I need to know is not "IF" they intersect, overlap, etc, but rather exactly "HOW MUCH" intersection, overlap, etc there is.
The IRelationalOperator is no help with this either. Like a spatial query, it only reveals whether or not there is a relationship, but does not quantify "how much" that relationship is.
I also don't think that the ITopologicalOperator will work as it literally modifies the polygon being examined. I do not want to modify any existing feature polygons.
I don't think GeoProcessing Tools will work because they want to create additional layer files, etc. Very messy. There has to be a simpler way than creating additional layers, then loading them, then examining them, then unloading them, then deleting them. That's rediculous.
I don't believe that envelopes will work either because if envelopes can only be square or rectangular shaped, then clearly they cannot tell me the area as pictured in the attachment, as it is random shaped, not rectangular. All examples I have seen with Envelopes, they are always rectangle shaped, and nowhere in the documentation does it even suggest that an envelope can be anything but a rectangle. I would need an envelope whose shape exactly matches that of the polygon in question.
The solution requires two critical parts
(1) I be able to do this without modifying or affecting the polygons participating in the operation.
(2) I don't want to create any new layers or features which must be added to my map in order to compute this. I just want something I can do in memory and easily throw away.
So if your suggested technique requires that a new polygon be created, but in memory only, and I can examine it through a reference to it, but it does not participate in my map in any way, that's fine.
I'm still in shock that this isn't a massively popular topic as I've yet to find anything in the documentation on this exact idea, nor apparently has anyone attempted it in the forums.
So please don't point me to another forum post which is only remotely related to this topic as I have already looked at hundreds of them, and none appeared to be relevant.
Thanks a lot.
I'm sure your suggestion will help lots of people... if not in the past, then in the future.