<?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: spatial difference between 2 polygon layers with VBA in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683842#M18401</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, if you look into the one that identified by the script as equal but not selected by the tool, can you tell whether or not they are the same in both layers?&amp;nbsp; As I know the method of IClone::IsEqual is reliable.&amp;nbsp; I am not clear about the statement "some features which did overlap exactly were also displayed by the script", I suppose they are not selected by the tool.&amp;nbsp; Do you think they should be equal or not?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jun 2013 16:39:40 GMT</pubDate>
    <dc:creator>WeifengHe</dc:creator>
    <dc:date>2013-06-12T16:39:40Z</dc:date>
    <item>
      <title>spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683835#M18394</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;BR /&gt;&lt;SPAN&gt;I have 2 polygon layers. PolyOldLayer has some old data and based on the new records, PolyOldLayer had been edited&amp;nbsp; and saved as polyNewLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to have the count of all the polygons I edited with reference to PolyOldLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e The spatial difference between PolyOldLayer and PolyNewLayer with VBA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can it be achieved.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 08:24:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683835#M18394</guid>
      <dc:creator>arct</dc:creator>
      <dc:date>2013-05-31T08:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683836#M18395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Let me try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'First get the feature class from the 2 layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featClsOld = PolyOldLayer.FeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featClsNew = PolyNewLayer.FeatureClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Use cursors for looping through featClsOld&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featCursorOld = featClsOld.Search(Nothing, true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featureOld = featCursorOld.NextFeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; While Not featureOld Is Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'loop here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set featureOld = featCursorOld.NextFeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Wend&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Inside the loop, find the feature in featClsNew with the same ObjectID as featureOld&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'using IQueryFilter and the WhereClause specify the query condition of ObjectID&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; featCursorNew = featClsNew.Search(queryFilter, true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureNew = featCursorNew.NextFeature&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Use IClone method IsEqual to compare the geometries of the two features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set cloneOld = featureOld.ShapeCopy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set cloneNew = featureNew.ShapeCopy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If cloneOld.IsEqual(cloneNew) = False Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count++&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Here count is the number of polygons edited.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 22:49:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683836#M18395</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-05-31T22:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683837#M18396</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;BR /&gt;&lt;SPAN&gt;I am quite new to arcObjects. I got the logic behind this, but get struck in 'IQueryFilter' &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Dim pQueryFilter As IQueryFilter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set pQueryFilter = New QueryFilter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ' Set the where clause&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; pQueryFilter.WhereClause = "ObjectID = 'ToWhatand HOW'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope you can help me resolve this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Inside the loop, find the feature in featClsNew with the same ObjectID as featureOld 'using IQueryFilter and the WhereClause specify the query condition of ObjectID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 03:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683837#M18396</guid>
      <dc:creator>arct</dc:creator>
      <dc:date>2013-06-05T03:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683838#M18397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you edit a featue, the OBJECTID value won't change, so you can get the Object ID of the feature in old feature class, featureOld.OID and assign it to some string variable, say s.&amp;nbsp; You can then search the new feature class for the feature with the same Object ID with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pQueryFilter.WhereClause = "OBJECTID = " &amp;amp; "s"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jun 2013 16:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683838#M18397</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-06-07T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683839#M18398</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;BR /&gt;&lt;SPAN&gt;Thanks, got the answer to my query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I have one more query, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The output from this script(cloneOld.IsEqual(cloneNew) = True ) and select by location --&amp;gt; 'Target layer features are identical to the source layer features' output should be same?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I get different count.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to do "&lt;/SPAN&gt;&lt;STRONG&gt;select by location --&amp;gt; 'Target layer features are identical to the source layer features'&lt;/STRONG&gt;&lt;SPAN&gt;" in VBA. Is this the right approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the feature count from my VBA script and from "select by location --&amp;gt; 'Target layer features are identical to the source layer features'" should be same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 03:58:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683839#M18398</guid>
      <dc:creator>arct</dc:creator>
      <dc:date>2013-06-11T03:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683840#M18399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hm.&amp;nbsp; Were you able to identify which features causing the inconsistence between these two approaches?&amp;nbsp; Can you tell which approach works better in those cases?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 17:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683840#M18399</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-06-11T17:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683841#M18400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;"select by location --&amp;gt; 'Target layer features are identical to the source layer features'" gives the best results. some features which did overlap exactly were also displayed by the script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hence the count was greater than "select by location --&amp;gt; 'Target layer features are identical to the source layer features'" option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 09:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683841#M18400</guid>
      <dc:creator>arct</dc:creator>
      <dc:date>2013-06-12T09:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: spatial difference between 2 polygon layers with VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683842#M18401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, if you look into the one that identified by the script as equal but not selected by the tool, can you tell whether or not they are the same in both layers?&amp;nbsp; As I know the method of IClone::IsEqual is reliable.&amp;nbsp; I am not clear about the statement "some features which did overlap exactly were also displayed by the script", I suppose they are not selected by the tool.&amp;nbsp; Do you think they should be equal or not?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 16:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/spatial-difference-between-2-polygon-layers-with/m-p/683842#M18401</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-06-12T16:39:40Z</dc:date>
    </item>
  </channel>
</rss>

