I'm using QGIS 3.26 to create a precipitation map for Los Angeles. I started with Final 85th Percentile, 24-hr Rainfall contours from here: https://dpw.lacounty.gov/wrd/hydrologygis/

I brought the shapefiles into QGIS:

vector drawing of contours

Merged the contours with a county boundary (using the Merge vector layers tool):

vector image of contours plus boundary edge

I manually snapped the contour edges to the county boundary edges whenever there was a gap or overshoot using editing tools.

Now I am trying to split the county boundary polygon with these line layers using the Split with lines tool, but I'm not getting complete splitting. As you can see, some lines failed to split the polygon, for example in the upper right corner of the image:

vector image of map with polygon fills

I double-checked the missing contour edges and the contours are successfully snapped to the county boundary with no gaps. What can I do to get complete splitting and thus turn the contour map into polygons? All layers are using EPSG:4326.

UPDATE At Matt's suggestion, I ran Lines to Polygons on my manually snapped line layer. I got a few of the following errors:

One or more line ignored due to geometry not having a minimum of three vertices.

and the following map:

image of map with lines and polygons

I also tried Polygonize. It gave me the same results as with the Split with lines tool.

  • Try extending the troublesome lines a little way past the polygon boundary. Alternatively, does the tool Lines to Polygons on your manually snapped line layer give you the desired result?
    – Matt
    Oct 25, 2022 at 17:48
  • 1
    @Matt Extending the lines worked! Could you please write this as an answer so others can find this solution? Oct 25, 2022 at 18:29

1 Answer 1


Try extending the lines past the boundary of the polygon, like so:

enter image description here

Your Answer

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

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