1

I have two vector layers. One lines and the other points.

I am trying to find how far dots are apart from lanes, on average?

I am thinking about setting a buffer around the lines, and finding how many points would be in that buffer, but may be there are other simpler functions in QGIS

enter image description here

2

Use the GRASS tool v.net.connect to create the nearest line from each point. You can access this from the Processing Toolbox.


Example:

  1. Simple point and line layers

    Points and lines

  2. Run the said tool:

    v.net.connect

  3. Hopefully, it will output another line layer containing lines connecting each point to its nearest line (network):

    Connected points to lines

  4. Use the Field Calculator on the output layer, create a new field and use the expression $length to calculate the length of each line in your output layer, including those which connects the point.

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.