Wednesday, 12 December 2018

topology - How to remove spikes in Polygons with PostGIS


I'm trying to validate the topology of a shapefile. I managed to repair cases of overlap and gaps, but i can't resolve cases of spikes. The image shows one example of this situation.


enter image description here


I used the comand:


SELECT geom,
ST_Buffer( ST_Buffer( ST_Buffer(geom,0.00001, 'join=mitre'),-0.00002,
'join=mitre'),0.00001, 'join=mitre') AS geom_spike_removed
FROM repaired_polygons;


it works fine to remove the spikes, but changes the original form of the polygon. Comparing area and perimeter before and after, we can see that the perimeter changes because there is no more spikes, and the difference on area it's not absurd, but anyway it changes a little the geometry of the polygons, causing new cases of small overlaps and small gaps.


How can i remove this spikes without changing the original geometry of the polygon? Any suggestions?




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