0

I have an SVG diagram depicting the Earths landmasses (like an atlas). Each country is a separate object, which worked fine for its initial purpose, where I set a 1pt stroke, so all the borders were visible.

But now, I want to remove the borders and join them all up so that all the adjacent countries are no longer separate objects.

In their current state, they can't endure much manipulation before the gaps are revealed. Below is an example to show what I mean. See, the image is distorted a bit, to wrap around a 3D surface and it ends up looking like landlocked and adjacent countries are actually separated by water, which of course they aren't.

How can I combine them into a single object? I tried using the Pathfinder tool (Unite, Merge, etc.), but because the separate objects don't overlap, nothing happens, even though they're hard up against each other.

Example

1 Answer 1

2

Easiest Solution....

  • Select the Green.
  • Add a matching color 0.5pt stroke to everything (a green stroke)
  • Object > Expand (so the strokes become overlapping shapes)
  • Pathfinder > Merge

This does increase the size of the final merged shapes by 0.25pts (half the stroke width). Customarily this 0.25pt increase in size is negligible and can often safely be added without issue. If you are okay with that 0.25pt extra, then you are done.

If that 0.25pt extra is a problem....

  • With the "merge" still selected...
  • Add another 0.5pt stroke of a very different color, something like 100% magenta.
  • Object > Expand
  • Pathfinder > Merge.
  • Use the Direct Selection Tool (white arrow) to click one of the (magenta) shapes.
  • Choose Select > Same > Fill & Stroke
  • Hit the Delete key.

What this does.... adds .5pt to all shapes, so they overlap. Merges them making the final merged shapes .25pts larger (half the stroke width). Then the (magenta) stroke and merge removes .25pt (half the stroke width) from the final merged shape(s). All this results in the same shapes you started with, but all merged where possible.


Using strokes in this manner to slightly increase the size of things, and forcing them to overlap slightly, can assist in pathfinder operations at times. This won't "plug" any holes/counters (unless they are smaller than .5pt in diameter) and really leaves you with the same final circumference path outlines.

2
  • Merge or Unite? That part always confuses me.
    – voices
    Nov 11, 2018 at 2:17
  • @tjt263 Merge not Unite. There's a reason... See here Merge won't eliminate perhaps different color-filled shapes (like lakes). Unite would. Essentially if you have drawn and color-filled "counters" Unite will combine those with surrounding shapes in a selection ignoring any color differences. Merge will keep them as separate shapes if they are a different color.
    – Scott
    Nov 11, 2018 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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