[Qgis-user] Re: Snap points to nearest line

magerlin MAP at ramboll.dk
Tue Nov 15 02:52:02 PST 2011


Cameron Munro wrote:
> 
> Hi,
> 
> I have two layers - points and lines. I'd like to snap the points to the
> nearest line and take the attributes of that line. Is this possible within
> QGIS?
> 
> Thanks,
> 
> Cameron.
> 

Hi Cameron

Two suggestions, but not an excact solution:

You can use the mmqgis plugin and select "Hub Distance". With this you can
transfer an attribute (or an ID and then use a join afterwards) to a
pointlayer from the nearest line in a linelayer.

But be aware that "nearest" line will be based only on a "centre point" for
the line and if your lines are very curved or of varying lengths you may not
get the expected result.

You might use the "Vector-Geometry Tools-Extract Nodes" to convert your line
layer to a point layer and use this point layer as the Hublayer instead of
the line layer.

Anybody knows an excact method?




-----
Regards Morten

(Qgis 1.7.1 and Win 7)
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Snap-points-to-nearest-line-tp6994907p6995832.html
Sent from the qgis-user mailing list archive at Nabble.com.



More information about the Qgis-user mailing list