Skip to main content
code formatting
Source Link
vinayan
  • 7.3k
  • 3
  • 37
  • 76

I have a python code to delete duplicate geometry..

code snippet:

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "NEW_SELECTION", gbgquery)

gp.SelectLayerByLocation_management(featureverticeshp_Layer, "ARE_IDENTICAL_TO", featureverticeshp_Layer, "", "NEW_SELECTION")

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "REMOVE_FROM_SELECTION", gbgquery)

gp.DeleteFeatures_management(featureverticeshp_Layer)

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "NEW_SELECTION", gbgquery)    
gp.SelectLayerByLocation_management(featureverticeshp_Layer, "ARE_IDENTICAL_TO", featureverticeshp_Layer, "", "NEW_SELECTION")    
gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "REMOVE_FROM_SELECTION", gbgquery)    
gp.DeleteFeatures_management(featureverticeshp_Layer)

If you want I can provide the entire code (author name: Gerry Gabrisch). (I forgot from where I download it, but works fine with shape file).

I have a python code to delete duplicate geometry..

code snippet:

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "NEW_SELECTION", gbgquery)

gp.SelectLayerByLocation_management(featureverticeshp_Layer, "ARE_IDENTICAL_TO", featureverticeshp_Layer, "", "NEW_SELECTION")

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "REMOVE_FROM_SELECTION", gbgquery)

gp.DeleteFeatures_management(featureverticeshp_Layer)

If you want I can provide the entire code (author name: Gerry Gabrisch). (I forgot from where I download it, but works fine with shape file).

I have a python code to delete duplicate geometry..

code snippet:

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "NEW_SELECTION", gbgquery)    
gp.SelectLayerByLocation_management(featureverticeshp_Layer, "ARE_IDENTICAL_TO", featureverticeshp_Layer, "", "NEW_SELECTION")    
gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "REMOVE_FROM_SELECTION", gbgquery)    
gp.DeleteFeatures_management(featureverticeshp_Layer)

If you want I can provide the entire code (author name: Gerry Gabrisch). (I forgot from where I download it, but works fine with shape file).

Source Link
vadivelan
  • 454
  • 4
  • 11

I have a python code to delete duplicate geometry..

code snippet:

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "NEW_SELECTION", gbgquery)

gp.SelectLayerByLocation_management(featureverticeshp_Layer, "ARE_IDENTICAL_TO", featureverticeshp_Layer, "", "NEW_SELECTION")

gp.SelectLayerByAttribute_management(featureverticeshp_Layer, "REMOVE_FROM_SELECTION", gbgquery)

gp.DeleteFeatures_management(featureverticeshp_Layer)

If you want I can provide the entire code (author name: Gerry Gabrisch). (I forgot from where I download it, but works fine with shape file).