On 17/04/2012 10:20, Harald Hofmann wrote:
Hi,
sorry, I have a rather simple question.

I need to determine the distance in between the points of a vector layer. I went down a river and had a GPS on a minute scale logging my position while I was measuring some dissolved gases continuously in the river water along the flow path.
I have merged the GPS log with my chemistry data from my data loggers over the measuring time in R and imported it with v.in.ascii.
What I need now is the distance in between the single measuring points while going downstream for modelling purposes.

I spent about an hour trying to find a way to do so and can't figure it out. Sorry. I bet there must be a simple solution to that. Using the measuring tool would be cumbersome as I have about 500 points.

I looked into v.distance with the GRASS plug-in but that measures distances between two vector layers, right?

You're on the right track: the v.distance module has a "to_along" option. Here's what you can do:

First use the v.in.lines module to import the ascii GPS log points as a line feature.
v.in.lines gps_points.txt out=river_line fs=, 
# (comma separated?)
# This module isn't in the QGIS GRASS toolbox yet, so you'll have to either run GRASS standalone, or use the GRASS terminal in QGIS

Now add a column to the points table to accept the distance along the line:
v.db.addcol gps_points column="along double precision"

Now run v.distance as:
v.distance from=gps_point to=river_line upload=to_along column=along out=connectors
# The output parameter hold the line segments connecting each point to the river_line. It's required by the module to run, by has no significance for you. 

Cheers,
Micha

Help would be really appreciated. And I am sorry if that has been asked before but I couldn't find a thread dealing with that.

Best regards,
Harald




-- 
Micha Silver
052-3665918

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to