4

I have a whole lot of polygon shapefiles, many of which have got duplicate nodes. This makes processing difficult as almost all tools (erase, union, calculate area) do not work.

I found that by removing duplicate nodes from the 'offending' polygons the shapefiles become usable. However there are well over a hundred shapefiles and going through all of these is a nightmare.

Is it possible to automate the process using ArcPy or VB? If it is possible, how can it be done?

If not, are there any free libraries in .NET (C# or VB.NET) or Python that can be used to perform this task?

I tried the Python shapefile library (http://code.google.com/p/pyshp) but I found that when it is done removing the duplicate nodes, ArcMap is still unable to handle the shapefiles, giving the same errors as before.

0

1 Answer 1

5

Repair Geometry is documented to remove duplicate vertices in shapefiles, see: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000003v000000

1
  • You could combine that with arcpy.ListFeatureClasses() to generate a list of the shapefiles in a folder, or arcpy.da.walk() to find all of the shapefiles in the directory tree below a given folder.
    – Bjorn
    Commented Aug 11, 2017 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.