I have two layers - one layer that is a map of rivers (the lines), and a second layer that is a map of the catchment basins (the polygons in yellow). I intend to make a colourful map where the rivers have different colors based on which catchment they are in.

The vector with two layers

I would like to convert all the river paths into groups of paths that are split by the shape of the catchment polygons. And then stylize the group paths accordingly.

I converted the polygons into a complex path, the rivers into a complex path and then tried clipping it, that didn't work. How else can I do this in Illustrator?

  • Welcome to GDSE - glad to have you here! Please look around tour to get a sense of who we are as a community, and what we're about. Look at How to Ask and How to Answer questions, to learn how to frame acceptable queries and what to expect of replies and answers; please also look at help center to understand our community's internal behavioural expectations. So far, great start with a solid question, clear demonstration of what you've tried, and what your stopping issue is - again, welcome! Feb 6 '19 at 16:04
  • 1
    You can clip with multiple paths just as long as the nultiple paths are first made into a compound object
    – joojaa
    Jun 30 '20 at 20:43

If you are okay with the rivers being shapes and not merely stroked paths....

  • Select all
  • Object > Expand Appearance (if available)
  • Object > Expand and merely click OK
  • Pathfinder Panel: Click the Merge button.

You will then have individual sections based upon areas of adjacent color.

Note that this will split the "ochre" colored masses by the river paths as well. If you want those encompassing shapes to remain whole shapes, then duplicate those first and do not include the duplicates when using Pathfinder. Then you'll have to delete the divisions created after running the Pathfinder command.

For more on how the Pathfinder operations work, see here.


Illustrator has a simple way to color the rivers. No need to split anything. The rivers can well be open stroked paths and made of as many pieces as you want.

An example (with zero geographic logic):

enter image description here

Rectangles A and B (no stroke, fill only) present 2 of your catchment basins. The grey curve is a river with two branches.

Group all river curves to a single group. Make them white.

Duplicate the basins and colorize the duplicates to the wanted basin indicator colors (green, red). Group all colored basin duplicates to a single group.

Arrange the group of rivers to front. Let the original basins (A,B) be in the background:

enter image description here

Select both groups (=the rivers and the colored basins). Let the rivers be an Opacity Mask for the colored basins. You find command "Make Opacity Mask" in the Transparency Panel. Option Clip must be ON.

enter image description here

The method has a drawback: There's no easy way to separate the colored rivers and use them elsewhere as colored vector paths with no extras. To keep the colors the colored basin shapes and the opacity mask relations must be kept along.

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.