I have polygon shapefile representing administrative districts. There are small spaces between polygons where the polygons should be touching. There are probably also overlapping polygons. How can I have the polygons snap together, filling the gaps or slivers and removing overlap (possibly in R, QGIS or SAGA)?

2 Answers 2


You might be able to do this in R with the rmapshaper package, more specifically the ms_simplify function.

The best tool I've actually used for this is pprepair, which is a standalone C program, gettable from github:



I'd use GRASS 7 for this personally, since its topologically aware. You can import with a snap distance set to remove small slivers, and then use the module v.clean in various ways to handle whatever other problems the software reports. As a last resort, you may have to hand edit a couple of points, but this should be unusual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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