<?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: Intersection of two feature in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763142#M20204</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for replay!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have read the link posted &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;but refer to ArcObject 10 and I use ArcObject 9.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the link above there isn't an example to try intersection between two feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone suggest me how use ITopologicalOperator.Intersct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 13:12:41 GMT</pubDate>
    <dc:creator>FilippaFideria</dc:creator>
    <dc:date>2013-02-28T13:12:41Z</dc:date>
    <item>
      <title>Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763140#M20202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi forum&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to create a function that calculates the intersection area of two features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use ArcMap 9.3.1, ArcObjects 9.3 and .NET language (particularly C#).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would create a Tool Command that interset two Feauture of two different Personal Geodatabase (MDB).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no idea how to do it and I did not find code examples on the forum.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you suggest some code or some link, please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 12:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763140#M20202</guid>
      <dc:creator>FilippaFideria</dc:creator>
      <dc:date>2013-02-26T12:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763141#M20203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m000003vs000000.htm"&gt;ITopologicalOperator&lt;/A&gt;&lt;SPAN&gt; has an intersect method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 20:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763141#M20203</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2013-02-27T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763142#M20204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for replay!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have read the link posted &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;but refer to ArcObject 10 and I use ArcObject 9.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the link above there isn't an example to try intersection between two feature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can someone suggest me how use ITopologicalOperator.Intersct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 13:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763142#M20204</guid>
      <dc:creator>FilippaFideria</dc:creator>
      <dc:date>2013-02-28T13:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763143#M20205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;thanks for replay!&lt;BR /&gt;I have read the link posted &lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000003vs000000&lt;/A&gt;&lt;BR /&gt;but refer to ArcObject 10 and I use ArcObject 9.3.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry. With a quick google search I'm sure you can find the 9.3 arcobjects help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Can someone suggest me how use ITopologicalOperator.Intersct?&lt;BR /&gt;Please?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, let's look at this together:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;STRONG&gt;public &lt;/STRONG&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m000001rm000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;IGeometry&lt;/A&gt;&lt;STRONG&gt; Intersect (&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m000001rm000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;IGeometry&lt;/A&gt; &lt;SPAN style="font-style:italic;"&gt;other,&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m00000017000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;esriGeometryDimension&lt;/A&gt; &lt;SPAN style="font-style:italic;"&gt;resultDimension&lt;/SPAN&gt; &lt;STRONG&gt;);&lt;/STRONG&gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You have a public method that has a return type of IGeometry.&amp;nbsp; So, that means the result of calling this method must be assigned to some other variable, I would venture a guess it is something that implements the IGeometry Interface.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some pseudocode may look like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry polygonOne = some feature geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ITopologicalOperator topOp = (ITopologicalOperator) some feature geometry;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry resultPolygon = (IPolygon) to.intersect(polygonOne, &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/002m/002m00000017000000.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;one of these&lt;/A&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:25:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763143#M20205</guid>
      <dc:creator>LeoDonahue</dc:creator>
      <dc:date>2021-12-12T08:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763144#M20206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In order to get the area of intersection, both input geometries have to be polygon type geometry, and you need to choose the result dimenstion to be esriGeometry2Dimension.&amp;nbsp; And you will need IArea interface to get the area.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ITopologicalOperator t = polygon1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeometry g = t.Intersect(polygon2, esriGeometry2Dimension)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IArea a = g&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a.Area is what you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no behavior change between 9.3 and 10 for Intersect method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 14:50:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763144#M20206</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-02-28T14:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763145#M20207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In order to get the area of intersection, both input geometries have to be polygon type geometry, and you need to choose the result dimenstion to be esriGeometry2Dimension.&amp;nbsp; And you will need IArea interface to get the area.&lt;BR /&gt;&lt;BR /&gt;ITopologicalOperator t = polygon1&lt;BR /&gt;IGeometry g = t.Intersect(polygon2, esriGeometry2Dimension)&lt;BR /&gt;IArea a = g&lt;BR /&gt;a.Area is what you want.&lt;BR /&gt;&lt;BR /&gt;There is no behavior change between 9.3 and 10 for Intersect method.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks thanks thanks a lot for reply!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not an expert with ArcObjects development and I think that the argument of intersectios is very difficult!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tested your code and something happens but I don't understand if the result is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I pass to the code suggested by you, a selected feature?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know how select a feature but I don't know how assign a selected feature to:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ITopologicalOperator t = (ITopologicalOperator)Feat.Shape;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead of (ITopologicalOperator)Feat.Shape there should be (ITopologicalOperator)selectedFeature.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank thanks thanks so much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 07:40:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763145#M20207</guid>
      <dc:creator>FilippaFideria</dc:creator>
      <dc:date>2013-03-01T07:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection of two feature</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763146#M20208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can store the result geometry to database or draw in ArcMap to verify whether or not the output is correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is code snippet in ArcObjects SDK to select map features by attribute query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004900000088000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//004900000088000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can also select the feature using IFeatureClass::Search with query filter set, this will return a feature cursor.&amp;nbsp; Call IFeatureCursor::NextFeature gets the feature object you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 16:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/intersection-of-two-feature/m-p/763146#M20208</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-03-01T16:41:10Z</dc:date>
    </item>
  </channel>
</rss>

