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
Best Answer
Use the GRASS tool v.net.connect to create the nearest line from each point. You can access this from the Processing Toolbox.
Example:
Simple point and line layers
Run the said tool:
Hopefully, it will output another line layer containing lines connecting each point to its nearest line (network):
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.