<?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 Eliminate with criteria in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322661#M11362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to perform an eliminate on sub-acre polygons in a feature class. I need to choose 1 surrounding polygon to merge with the subacre poly based on prioritized criteria rules (if statements). I am not sure this is possible without creating feature classes for each subacre polygon and it's surrounding polygons, performing the eliminate, then appending them all back into a new feature class. Ideas? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rules would be in order A, B, C, D, E, F, G. Rules example: A would merge with B, B with C and so on but A could be surrounded by any letter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have code that selects and re-selects to whittle it down so that only the 2 polygons to be merged remain and it's in a loop but Eliminate wants a feature layer as the input, not 2 polygons. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 May 2015 00:08:43 GMT</pubDate>
    <dc:creator>AmyKlug</dc:creator>
    <dc:date>2015-05-08T00:08:43Z</dc:date>
    <item>
      <title>Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322661#M11362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to perform an eliminate on sub-acre polygons in a feature class. I need to choose 1 surrounding polygon to merge with the subacre poly based on prioritized criteria rules (if statements). I am not sure this is possible without creating feature classes for each subacre polygon and it's surrounding polygons, performing the eliminate, then appending them all back into a new feature class. Ideas? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rules would be in order A, B, C, D, E, F, G. Rules example: A would merge with B, B with C and so on but A could be surrounded by any letter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have code that selects and re-selects to whittle it down so that only the 2 polygons to be merged remain and it's in a loop but Eliminate wants a feature layer as the input, not 2 polygons. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 00:08:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322661#M11362</guid>
      <dc:creator>AmyKlug</dc:creator>
      <dc:date>2015-05-08T00:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322662#M11363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once you have the polygons, you could use the geometry itself with one of the many geometric operations:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/Polygon/018z00000061000000/" title="http://resources.arcgis.com/en/help/main/10.2/index.html#/Polygon/018z00000061000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 01:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322662#M11363</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-08T01:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322663#M11364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I have code that selects and re-selects to whittle it down so that only the 2 polygons to be merged remain and it's in a loop but Eliminate wants a feature layer as the input, not 2 polygons.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Eliminate wants a feature layer &lt;EM&gt;with a selection active&lt;/EM&gt; on polygons that you want to remove.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if you are using the right tool here.. like maybe a Feature To Line, followed by processing of left/right polygon information, followed by Dissolve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps you could provide a more detailed description of what you are trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 05:47:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322663#M11364</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-08T05:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322664#M11365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's it. Thank you much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I get it working I will post the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 16:35:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322664#M11365</guid>
      <dc:creator>AmyKlug</dc:creator>
      <dc:date>2015-05-08T16:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322665#M11366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curtis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the polygon example I am working on. I want to merge A subacres to B, C to D and so on&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 16:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322665#M11366</guid>
      <dc:creator>AmyKlug</dc:creator>
      <dc:date>2015-05-08T16:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322666#M11367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... and B to C, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would the result of the image posted be something like this (3 polygons, indicated with the black outline)?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="result.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/96503_result.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;You will probably have to keep trace of the original polygon neighbors to define the contiguity you are looking for. Example; look the the polygon B in the lower right corner. It is connected to the small polygon A in its upper left corner. This will create a polygon composed of AB, but when you check for further contiguity there is polygon C (in the upper left corner bordering to the small polygon A, now part of AB). Since this polygon C is not connected to the polygon B but only to the original polygon A, you cannot include it in the polygon AB. This relation can only be checked in the original neighbors. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to look at the Polygon neighbors tool: &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//000800000047000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//000800000047000000"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt;&amp;nbsp; (if you have access to an advanced license). This will be of great help in the process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 17:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322666#M11367</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-05-08T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322667#M11368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What the finished product would look like (the polygon neighbor tool looks very promising)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="96514" alt="Result.JPG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/96514_Result.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="polygons - Copy.JPG" class="image-2 jive-image" src="/legacyfs/online/96515_polygons - Copy.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 19:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322667#M11368</guid>
      <dc:creator>AmyKlug</dc:creator>
      <dc:date>2015-05-08T19:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminate with criteria</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322668#M11369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is how I got it to work. I would still prefer to find a way to do this without creating all the feature layers and appending. Ideas?????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
arcpy.env.overwriteOutput = True
fc = "C:\\Amy\\Test.gdb\\SubAcreTest_p"
ntbl = "C:\\Amy\\Test.gdb\\Neighbor_tbl"
sorttbl = "C:\\Amy\\Test.gdb\\tbl_sort"
stattbl = "C:\\Amy\\Test.gdb\\tbl_stat"
arcpy.AddMessage("Performing neighbor analysis....")
arcpy.PolygonNeighbors_analysis(fc, ntbl, "OBJECTID;Acre;SHAPE_Length;SHAPE_Area;Letter", "NO_AREA_OVERLAP", "BOTH_SIDES", "", "FEET", "SQUARE_METERS")
sc = arcpy.da.UpdateCursor(ntbl, ['src_Acre', 'NODE_COUNT'])
arcpy.AddMessage("Removing polygons larger or equal to 1 acre and removing node polygons from neighbor table....")
for s in sc:
&amp;nbsp;&amp;nbsp;&amp;nbsp; if s[0] &amp;gt; 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.deleteRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif s[1] == 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.deleteRow()
del s, sc
arcpy.AddMessage("Making sort table....")
arcpy.Sort_management(ntbl, sorttbl, "src_Acre ASCENDING;nbr_Letter ASCENDING", "UR") #making sure the first letter choice is first in position for stat table to isolate
arcpy.AddMessage("Making summary statistics table....")
arcpy.Statistics_analysis(sorttbl, stattbl, "nbr_Letter FIRST;nbr_OBJECTID FIRST", "src_OBJECTID") #make table (used in query) for selecting the first letter and coresponding object id's to be merged 
arcpy.env.workspace = "C:\\Amy\\Test.gdb\\polyfiles" #feature dataset
#searching for object id's in stat table to use in query of final feature class
#code will grab object id's from stat table, make a feature layer of 2 polygons to be dissolved and dissolve them, delete individual polygons from final layer and append the dissolved polygon into the final feature class 
cursor = arcpy.da.SearchCursor(stattbl, "*")
for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; OID1 = row[1]
&amp;nbsp;&amp;nbsp;&amp;nbsp; OID2 = row[4]
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Merging layers for Object ID's: " + str(OID1) + " and " + str(OID2))
&amp;nbsp;&amp;nbsp;&amp;nbsp; where_clause = "OBJECTID = %s OR OBJECTID = %s"%(OID1,OID2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(fc, "tmplyr", where_clause)
&amp;nbsp;&amp;nbsp;&amp;nbsp; diss_name = "Dissolve_%s_%s"%(OID1,OID2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sort_name = "Sort_%s_%s"%(OID1,OID2)
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Sort_management("tmplyr", sort_name, "Letter ASCENDING", "UR")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Dissolve_management(sort_name, diss_name, "", "Acre MAX;Letter LAST", "MULTI_PART", "DISSOLVE_LINES")
&amp;nbsp;&amp;nbsp;&amp;nbsp; uc = arcpy.da.UpdateCursor(fc, "OBJECTID")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for u in uc:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if u[0] == OID1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.deleteRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif u[0] == OID2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uc.deleteRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(diss_name, fc, "NO_TEST", "Acre \"Acre\" true true false 8 Double 0 0 ,First,#,Dissolve_1_5,MAX_Acre,-1,-1;Letter \"Letter\" true true false 10 Text 0 0 ,First,#,Dissolve_1_5,LAST_Letter,-1,-1;SHAPE_Length \"SHAPE_Length\" false true true 8 Double 0 0 ,First,#,Dissolve_1_5,SHAPE_Length,-1,-1;SHAPE_Area \"SHAPE_Area\" false true true 8 Double 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0,First,#,Dissolve_1_5,SHAPE_Area,-1,-1", "")
&amp;nbsp;&amp;nbsp;&amp;nbsp; del u, uc
del row, cursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:19:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/eliminate-with-criteria/m-p/322668#M11369</guid>
      <dc:creator>AmyKlug</dc:creator>
      <dc:date>2021-12-11T15:19:58Z</dc:date>
    </item>
  </channel>
</rss>

