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?