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