<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to compute overlapped area of polygonABC by polygonXYZ in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190687#M4965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am pretty sure you will need to do this in a few parts. First, use ShapeCopy for one of the input geometries. Then, use ITopologicalOperator5::Intersect or ITopologicalOperator6::IntersectEx to return a geometry that is the intersection of the two features. You will then have to calculate the area of this geometry with IArea. &lt;BR /&gt;&lt;BR /&gt;You may optionally want to project the intersection geometry into an equal area-based projected coordinate system.&lt;BR /&gt;&lt;BR /&gt;Melita&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was going to mark this thread as answered with your suggestion, but apparently that's not possible anymore since moving to these new forums.&amp;nbsp; Seems kinda stupid that we can't do that now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Feb 2011 14:57:35 GMT</pubDate>
    <dc:creator>ESRICustomer</dc:creator>
    <dc:date>2011-02-24T14:57:35Z</dc:date>
    <item>
      <title>How to compute overlapped area of polygonABC by polygonXYZ</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190684#M4962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My Environment&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]ArcEngine 9.3.X[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]Visual Studio 2008[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]VB.NET[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been scouring the forums and documentation for a way to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please refer to the attached image to follow along with my question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking for a way to &lt;/SPAN&gt;&lt;STRONG&gt;compute the area &lt;/STRONG&gt;&lt;STRONG&gt;of the overlapped portion &lt;/STRONG&gt;&lt;SPAN&gt;of FeatureABC on AlphaLayer, by FeatureXYZ on BetaLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll tell you below what I've examined so far. Please read that before answering, as this topic is very easily misunderstood.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I dont think a spatial query &lt;/SPAN&gt;&lt;STRONG&gt;ISpatialFilter&lt;/STRONG&gt;&lt;SPAN&gt; is appropriate for what I am looking for because that only tells me what RELATIONSHIP features share with each other, such as &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FeatureABC intersects FeatureXYZ. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need to know is not &lt;/SPAN&gt;&lt;STRONG&gt;"IF"&lt;/STRONG&gt;&lt;SPAN&gt; they intersect, overlap, etc, but rather exactly &lt;/SPAN&gt;&lt;STRONG&gt;"HOW MUCH"&lt;/STRONG&gt;&lt;SPAN&gt; intersection, overlap, etc there is. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;STRONG&gt;IRelationalOperator&lt;/STRONG&gt;&lt;SPAN&gt; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also don't think that the &lt;/SPAN&gt;&lt;STRONG&gt;ITopologicalOperator&lt;/STRONG&gt;&lt;SPAN&gt; will work as it literally modifies the polygon being examined. I do not want to modify any existing feature polygons.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think &lt;/SPAN&gt;&lt;STRONG&gt;GeoProcessing Tools&lt;/STRONG&gt;&lt;SPAN&gt; 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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution requires two critical parts &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(1) I be able to do this without modifying or affecting the polygons participating in the operation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure your suggestion will help lots of people... if not in the past, then in the future.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 19:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190684#M4962</guid>
      <dc:creator>ESRICustomer</dc:creator>
      <dc:date>2011-02-23T19:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute overlapped area of polygonABC by polygonXYZ</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190685#M4963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; My Environment&amp;nbsp; &lt;BR /&gt;[INDENT]ArcEngine 9.3.X[/INDENT]&amp;nbsp; &lt;BR /&gt;[INDENT]Visual Studio 2008[/INDENT]&amp;nbsp; &lt;BR /&gt;[INDENT]VB.NET[/INDENT]&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I have been scouring the forums and documentation for a way to do this.&amp;nbsp; &lt;BR /&gt;Please refer to the attached image to follow along with my question.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I am looking for a way to&amp;nbsp;&amp;nbsp; &lt;SPAN style="color:&amp;quot;red&amp;quot;;"&gt;&lt;STRONG&gt;compute the area &lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color:&amp;quot;magenta&amp;quot;;"&gt;&lt;STRONG&gt;of the overlapped portion &lt;/STRONG&gt;&lt;/SPAN&gt;of FeatureABC on AlphaLayer, by FeatureXYZ on BetaLayer.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I'll tell you below what I've examined so far. Please read that before answering, as this topic is very easily misunderstood.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I dont think a spatial query&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ISpatialFilter&lt;/STRONG&gt; is appropriate for what I am looking for because that only tells me what RELATIONSHIP features share with each other, such as&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FeatureABC intersects FeatureXYZ.&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;What I need to know is not&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;"IF"&lt;/STRONG&gt; they intersect, overlap, etc, but rather exactly&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;"HOW MUCH"&lt;/STRONG&gt; intersection, overlap, etc there is.&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;The&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IRelationalOperator&lt;/STRONG&gt; 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.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I also don't think that the&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;ITopologicalOperator&lt;/STRONG&gt; will work as it literally modifies the polygon being examined. I do not want to modify any existing feature polygons.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I don't think&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;GeoProcessing Tools&lt;/STRONG&gt; 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.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;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 square. All examples I have seen with Envelopes, they are always square shaped, and nowhere in the documentation does it even suggest that an envelope can be anything but a rectangle&amp;nbsp; &lt;BR /&gt;I would need an envelope whose shape exactly matches that of the polygon in question.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;The solution requires two critical parts&amp;nbsp;&amp;nbsp; &lt;BR /&gt;(1) I be able to do this without modifying or affecting the polygons participating in the operation.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;(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.&amp;nbsp; &lt;BR /&gt;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.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;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.&amp;nbsp; &lt;BR /&gt;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.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;Thanks a lot.&amp;nbsp; &lt;BR /&gt;I'm sure your suggestion will help lots of people... if not in the past, then in the future.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am pretty sure you will need to do this in a few parts. First, use ShapeCopy for one of the input geometries. Then, use ITopologicalOperator5::Intersect or ITopologicalOperator6::IntersectEx to return a geometry that is the intersection of the two features. You will then have to calculate the area of this geometry with IArea. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may optionally want to project the intersection geometry into an equal area-based projected coordinate system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 19:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190685#M4963</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2011-02-23T19:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute overlapped area of polygonABC by polygonXYZ</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190686#M4964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Start here, with the Object Model diagram:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en///en/sdk/10.0/Arcobjects_net/pdf/GeometryObjectModel.pdf.htm"&gt;http://help.arcgis.com/en/sdk/10.0/Arcobjects_net/pdf/GeometryObjectModel.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that Polygon has the ITopologicalOperator Interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice also on that diagram, that ITopologicalOperator also has a method called "Intersect", as Melita pointed out already.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, let's look here at the API for ITopologicalOperator:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m000003vs000000.htm"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m000003vs000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And there is sample code at the bottom ("ViperPinForm" - look for Private Sub SetPINValue().&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll have to modify it to suit your needs, but it outlines the general idea Melita provided.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1191011089911110910132989799107443210697991079711511546&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 01:23:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190686#M4964</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2011-02-24T01:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute overlapped area of polygonABC by polygonXYZ</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190687#M4965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am pretty sure you will need to do this in a few parts. First, use ShapeCopy for one of the input geometries. Then, use ITopologicalOperator5::Intersect or ITopologicalOperator6::IntersectEx to return a geometry that is the intersection of the two features. You will then have to calculate the area of this geometry with IArea. &lt;BR /&gt;&lt;BR /&gt;You may optionally want to project the intersection geometry into an equal area-based projected coordinate system.&lt;BR /&gt;&lt;BR /&gt;Melita&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was going to mark this thread as answered with your suggestion, but apparently that's not possible anymore since moving to these new forums.&amp;nbsp; Seems kinda stupid that we can't do that now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 14:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190687#M4965</guid>
      <dc:creator>ESRICustomer</dc:creator>
      <dc:date>2011-02-24T14:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to compute overlapped area of polygonABC by polygonXYZ</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190688#M4966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I was going to mark this thread as answered with your suggestion, but apparently that's not possible anymore since moving to these new forums.&amp;nbsp; Seems kinda stupid that we can't do that now.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think Leo's answer is probably better! Yes, a lot of people would like that type of functionality. The group involved is looking at several possibilities. Check out the &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/forums/81-Resource-Center-Site-Feedback"&gt;Resource Center Site Feedback forum&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For instance, the sticky Wish List thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Feb 2011 18:29:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-compute-overlapped-area-of-polygonabc-by/m-p/190688#M4966</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2011-02-24T18:29:00Z</dc:date>
    </item>
  </channel>
</rss>

