Saturday 30 September 2017

arcgis desktop - Removing spatially duplicate features using ModelBuilder?


I am creating a model to remove features which are duplicated within a polygon feature class. Most of the features are duplicated once, but about a quarter have up to three or four exact copies. I do not have ArcInfo, so I cannot use Delete Identical.


My model should contain the following:




  1. Make Feature Layer on the input feature class specified by the user to output Output_FL

  2. Get Count to count the number of rows within the feature class

  3. Create a variable counter and initialise to 0

  4. Add a While iterator where counter < row count

  5. Select Layer by Attribute on Output_FL to create a NEW_SELECTION where OBJECTID = counter

  6. Select Layer by Location on Output_FL where the relationship is ARE_IDENTICAL_TO

  7. Select Layer by Attribute on Output_FL to REMOVE_FROM_SELECTION where OBJECTID = counter

  8. Delete Features from Output_FL

  9. Increment counter



I have finished all the steps except step 9. I am not sure where/how I should increment the counter. I'm also not sure if I should put a Copy Features tool somewhere before the while loop as a backup mechanism since this model will be modifying the input data, and not everyone will make a backup of their data before running the model.



Answer



You should try this, Add XY coordinates to your featureclass, then Dissolve on the X,Y fields. This should remove your stacked, duplicate features. You can then join the attributes from your source file. You may need to concatenate X,Y to form a single field for the join.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...