I am trying to fix topological errors in this Shapefile of small areas of a state (Bahia) in Brazil. After applying prepair and PPrepair, the resulting shapefile has some spikes:
It looks like a line from far, but when we zoom in we can see that the spike has some area:
Then I removed the spikes with a Postgis buffer function:
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;
resulting in this, (I overlayed the layer) and got some holes between polygons:
How do I remove the slivers so that the empty area is attributed to the nearest polygon?
The spike and subsequent sliver is about 0.071mm in width.