<?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: Scripting Feature Compare Tool for Multiple Layers in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499633#M39234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P style="margin:0in;margin-bottom:.0001pt;line-height:18.0pt;"&gt;&lt;SPAN style="font-size:11.0pt;font-family: Calibri , sans-serif;"&gt;In this case, the two differences only point to the Schema owner in the database. If the base name "&lt;/SPAN&gt;&lt;SPAN style="font-size:11.0pt;font-family: Calibri , sans-serif ;mso-bidi-font-family:Arial;"&gt;GDM_CO_AREA_83” has not changed, you could control for the schema owner name change. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin:0in;margin-bottom:.0001pt;line-height:18.0pt;"&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Jul 2014 21:00:22 GMT</pubDate>
    <dc:creator>ChristianWells</dc:creator>
    <dc:date>2014-07-17T21:00:22Z</dc:date>
    <item>
      <title>Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499628#M39229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have hundreds of layers that I need to do a feature compare on to see if there are any differences between our 9.1 SDE layers and our recently created 10.1 layers from the same source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to confirm that during the porting process from 9.1 to 10.1 that the layers were not changed / distorted, etc. Row counts are the same, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I have so many layers I'm looking for a way to script a process that takes in many layers at at time and compares them to the new ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not a programmer by nature, so any help would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jennifer&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 20:07:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499628#M39229</guid>
      <dc:creator>JenniferDick</dc:creator>
      <dc:date>2014-07-17T20:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499629#M39230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should be some that is doable for your work. One tool that will be helpful in scripting is the Feature Compare tool which will compare a number of variables. Using this tool we should be able to script this for all of your layers. This could also be done through ModelBuilder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feature Compare:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000004000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000004000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a sample workflow logic that could be used to script this process:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy, os

#Create DB Connections to both databases
gdb91 = r"DB Connection"
gdb101 = r"DB Connection"

#Create a list to store the feature classes from both databases
list91 = []
list101 = []

#List the feature classes
arcpy.env.workspace=gdb91
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list91.append(fc)
arcpy.env.workspace=gdb101
fcList = arcpy.ListFeatureClasses()
for fc in fcList:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; list101.append(fc)

#Compare the feature name and them compare the feature classes themselves
for fc91 in list91:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; idx = list101.index(fc91)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc101 = list101[idx]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path91 = os.path.join(gdb91,fc91)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path101 = os.path.join(gdb101,fc101)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureCompare_management(path91, path101, out_compare_file=r"C:\CompareFile\{0}.txt".format(fc91))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Cannot compare layer {0}".format(fc91)




&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499629#M39230</guid>
      <dc:creator>ChristianWells</dc:creator>
      <dc:date>2021-12-11T21:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499630#M39231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's another conundrum: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to compare layers from our 9.1 database connection to our 10.1 database connection. Both of those connections do not have the same number of layers in them and the layer names in which I wan to compare are not the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I handle this through model building, by the use of special characters? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 20:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499630#M39231</guid>
      <dc:creator>JenniferDick</dc:creator>
      <dc:date>2014-07-17T20:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499631#M39232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P&gt;Hi Jennifer, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can handle the issue of not having the same number of layers. The layer names may be a little harder to automate, but may be doable. How have the new names changed and do you have a list of which ones line up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 20:50:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499631#M39232</guid>
      <dc:creator>ChristianWells</dc:creator>
      <dc:date>2014-07-17T20:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499632#M39233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could make up a list of comparable layer names, but here is an example of the differences:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GIS_FCT_.GDM_CO_AREA_83&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compares to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GDM_VLT.GDM_CO_AREA_83&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this particular care the 5,6, and 7 characters are different. But not 100% sure at this particular moment without diving into more if this is the case with each comparable layer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 20:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499632#M39233</guid>
      <dc:creator>JenniferDick</dc:creator>
      <dc:date>2014-07-17T20:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499633#M39234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;P style="margin:0in;margin-bottom:.0001pt;line-height:18.0pt;"&gt;&lt;SPAN style="font-size:11.0pt;font-family: Calibri , sans-serif;"&gt;In this case, the two differences only point to the Schema owner in the database. If the base name "&lt;/SPAN&gt;&lt;SPAN style="font-size:11.0pt;font-family: Calibri , sans-serif ;mso-bidi-font-family:Arial;"&gt;GDM_CO_AREA_83” has not changed, you could control for the schema owner name change. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin:0in;margin-bottom:.0001pt;line-height:18.0pt;"&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 21:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499633#M39234</guid>
      <dc:creator>ChristianWells</dc:creator>
      <dc:date>2014-07-17T21:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Feature Compare Tool for Multiple Layers</title>
      <link>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499634#M39235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;okay so here is another example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SPATIAL_VLT.IHS_PARK_27&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compares to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GIS_FCT.IHS_PARK_27&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how would I handle all these one offs in the model?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jul 2014 21:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scripting-feature-compare-tool-for-multiple-layers/m-p/499634#M39235</guid>
      <dc:creator>JenniferDick</dc:creator>
      <dc:date>2014-07-17T21:09:21Z</dc:date>
    </item>
  </channel>
</rss>

