I have a line layer and a vector grid. Now I want to count the lines in each raster. First I split the lines by intersecting the line layer with the vector grid.

Second, I need to do a multipart to singlepart for the lines because I want to count each line individually.

Now here is the problem: The lines are intersecting itself and at every intersection, the multipart-to-singlepart tool makes new parts of the lines.

How can I avoid this, are there other workarounds?

A picture als explanation:

  • "a vector raster" what is it ? Commented Oct 10, 2017 at 13:18
  • Sorry, wrong translation, I meant Vector grid (Vector -> research Tools -> Vector grid)
    – Martin
    Commented Oct 10, 2017 at 13:40
  • How many features do you need to do this for?
    – whyzar
    Commented Oct 10, 2017 at 14:21
  • The vector grid is built by 378 polygons. I have more than 100 lines (not all of them with self-intersection), after intersecting them with the vector grid there are more than 2000. And after executing multipart-to-singlepart more than 3000....
    – Martin
    Commented Oct 11, 2017 at 7:36


Your Answer

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

Browse other questions tagged or ask your own question.