Saturday, 25 March 2017

topology - Remove Duplicate Polygons Using Open Source Tools


I have a shapefile containing features with duplicate geometries, but different attributes (e.g. a polygon with attribute XX, and an identical polygon with attribute XY). I want to identify the duplicates, then pick the one with the correct attributes, deleting the other.


I've tried topology tools in OpenJump/Kosmo, but without success. They have a 'delete duplicates' tool that does what I want, except seems to arbitrarily delete one of the features rather than letting me pick which one to keep.


I have access to QGIS, OpenJUMP, Kosmo, etc. and am able to install other open source/free tools if required.


Thoughts?



Answer



Besides PostGIS, you could also use a topological open source GIS (GRASS):



  1. Download and install

  2. Start and select the Location manager, use the tool to generate a new project database from your SHAPE file (called "GRASS Location"), see here for a step-by-step guide


  3. Import the SHAPE file

  4. Use the "v.clean" tool which offers a series of options

  5. Export map back to SHAPE file format with "v.out.ogr"


Sidenote: we are planning to offer a WPS for this so that you can polish your data via our Web portal.


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...