<?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 do I compare the SHAPE field between two Annotation feature classes? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-compare-the-shape-field-between-two/m-p/321375#M24989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to compare two annotation feature classes using the Shape fields.&amp;nbsp; Below is an example of the code I used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = "AirportsAnno"
fc2 = "AirportsAnno_1"

y = str(arcpy.GetCount_management(fc))

x = 1

while x &amp;lt;= int(y):
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.SearchCursor(fc, "OBJECTID = " + str(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2 = arcpy.SearchCursor(fc2, "OBJECTID = " + str(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = row.shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom2 = row2.shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; if geom.equals(geom2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "OBJECTID " + str(row.OBJECTID) + " matches"
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "OBJECTID " + str(row.OBJECTID) + " does not match"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1

del row, rows, row2, rows2&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested this on the annotation feature class when a feature's text was updated, and when the annotation was moved.&amp;nbsp; In both cases the script reported that the features do not match.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 15:15:30 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-11T15:15:30Z</dc:date>
    <item>
      <title>How do I compare the SHAPE field between two Annotation feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-the-shape-field-between-two/m-p/321374#M24988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am writing a custom replication script that compares each field of every row in a feature class. I am able to compare the SHAPE field in point, polyline, or polygon features using row.SHAPE.equals(other_geometry), but this won't work for annotation feature classes. The returned arcpy object for the SHAPE field in annotation feature classes is a 'passthrough' object rather than a Polygon object. It doesn't seem to have any useful attributes for comparing. Is there any way for me to determine if the SHAPE fields are different between two annotation feature class rows?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2011 18:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-the-shape-field-between-two/m-p/321374#M24988</guid>
      <dc:creator>TannerSemerad</dc:creator>
      <dc:date>2011-09-12T18:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I compare the SHAPE field between two Annotation feature classes?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-compare-the-shape-field-between-two/m-p/321375#M24989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to compare two annotation feature classes using the Shape fields.&amp;nbsp; Below is an example of the code I used:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = "AirportsAnno"
fc2 = "AirportsAnno_1"

y = str(arcpy.GetCount_management(fc))

x = 1

while x &amp;lt;= int(y):
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.SearchCursor(fc, "OBJECTID = " + str(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows2 = arcpy.SearchCursor(fc2, "OBJECTID = " + str(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = row.shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in rows2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geom2 = row2.shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; if geom.equals(geom2):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "OBJECTID " + str(row.OBJECTID) + " matches"
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "OBJECTID " + str(row.OBJECTID) + " does not match"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; x += 1

del row, rows, row2, rows2&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested this on the annotation feature class when a feature's text was updated, and when the annotation was moved.&amp;nbsp; In both cases the script reported that the features do not match.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:15:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-compare-the-shape-field-between-two/m-p/321375#M24989</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-11T15:15:30Z</dc:date>
    </item>
  </channel>
</rss>

