Select to view content in your preferred language

Eliminate tool creates holes and overlaps

139
2
3 weeks ago
Anne-MarieDubois
Frequent Contributor

Hi,

I have a problem with the Eliminate tool (again). Basically, I have noticed that this tool will modify some polygons that are not originally selected. It will end in some holes being created or some overlap in other polygons. Here is an example:

Good ouput (done with geoprocessing tool in Arcgis pro)

AnneMarieDubois_0-1750160983212.png

Here are my tool parameter:

AnneMarieDubois_0-1750161542477.png

 

 

 

Bad output (with script)

AnneMarieDubois_1-1750160981404.png

 

Here is my script:

Superficie_minimale = 1
select_sup_minimale = f"Shape_area < {Superficie_minimale}"

# Éliminer les polygones trop petits
arcpy.management.MakeFeatureLayer(in_features=ZONE_DETAILS_merge_TROUS, out_layer="poly_a_fusionner")

arcpy.management.SelectLayerByAttribute(in_layer_or_view="poly_a_fusionner", selection_type="NEW_SELECTION", where_clause=select_sup_minimale, invert_where_clause="NON_INVERT")
    
OCCUPATION_TERRITOIRE = fr"{Resultat}\OCCUPATION_TERRITOIRE"

arcpy.management.Eliminate(in_features="poly_a_fusionner", out_feature_class=OCCUPATION_TERRITOIRE, selection="LENGTH")

 

What could be the problem?

Tags (2)
0 Kudos
2 Replies
Anne-MarieDubois
Frequent Contributor

well... again, it turns out I was the problem. The issue came along later on when the output is passed as spatial dataframe to make some calculations before returning to a feature class. I guess spatial.to_featureclasse does not deal well with complex geometries. Using a cursor instead to pass the new fields solved the issue.

UPDATE: No the problem is really the eliminate tool... I have run again my tests and no matter what I do, this tool modifies some polygons to create holes and overlaps

0 Kudos
KenHartling
Esri Contributor

Would you be able to provide the data as well?  This could be related to the data properties that are inherited during processing. 

Thx.

0 Kudos