Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the function gUnaryUnion to merge polygons in R. In one particuliar case this doesn't work correctly - some of the old polygon contours are still visible:

enter image description here

Can anybody help ?

share|improve this question
up vote 2 down vote accepted

I suspect your borders don't exactly match up. Either clean your source data or do a little trick I showed on a similar question on StackOverflow - add a little buffer round your polygons, enough to make sure things overlap.

The exact size of the buffer should be small enough to make sure misaligned edges overlap but not so big as to distort the real boundaries.

share|improve this answer
The buffer trick worked perfectly ! Thanks a lot, John – user2568648 Jul 17 '13 at 10:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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