[Qgis-user] Converting a line feature to evenly spaced point

Micha Silver micha at arava.co.il
Sat Jul 9 04:50:27 PDT 2011


On Fri, 2011-07-08 at 14:02 -0500, Ezra Boyd wrote:

> Hi Everyone,
> 
> I have a line feature that represents a road/trail along with a set of
> GPS points taken along the trail.  What I need to do is calculate the
> distance along the pathway from the trailhead to each GPS point.  The
> best way that I can think of to accomplish this is to convert the line
> feature to even spaced points (preferably 1 meter or 1 ft apart.)
> However, all of the line-to-point conversion tools that I have found
> simply create points at all the nodes of the line feature.  But, this
> want help me because I know that the nodes are not evenly spaced.
> Does anyone know of the line-to-point conversion tool that creates
> evenly spaced points?  Otherwise, does anyone have other ideas of how
> I can accomplish what I need to accomplish.
> 


You might find it helpful to use the GRASS module v.lrs.create to build
a "Linear Reference System". It will enter into certain columns that you
prepare in advance the distance from the start to each "milepost" i.e.
your GPS points. First use 'v.to.points' to create a new point vector
that contains all the vertices along the line.  So, assuming your
original line feature is one "polyline" (many short line segments with
only one beginning node and one ending node) then:

* Create a suitable GRASS location and mapset (based on the CRS of your
data)
* Use the GRASS toolbox to import the trail vector into GRASS with
v.in.ogr.
* If you have the original GPS locations import those into GRASS and
skip the next step, otherwise:
* Next use the v.to.points module to convert all vertices to a new point
vector. Note the checkbox in the module window "Write line vertices".  
* Now use v.lrs.create (Not in the GRASS Toolbox. You'll have to do this
from a command window) to create a new line vector with the start_mp,
end_mp, start_off, end_off and rstable columns as required, and you'll
have the distances from the beginning to each milepost. 

Here's more details:
http://grass.osgeo.org/gdp/html_grass63/lrs.html

Cheers,
Micha


> Thanks,
> Ezra
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> This mail was received via Mail-SeCure System.
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110709/4c328ee5/attachment.html>


More information about the Qgis-user mailing list