<html style="direction: ltr;">
  <head>
    <meta content="text/html; charset=windows-1255"
      http-equiv="Content-Type">
    <style>body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body style="direction: ltr;"
    bidimailui-detected-decoding-type="preferred-charset"
    bgcolor="#FFFFFF" text="#660000">
    On 17/04/2012 10:20, Harald Hofmann wrote:
    <blockquote cite="mid:4F8D19A7.6030609@monash.edu" type="cite">Hi,
      <br>
      sorry, I have a rather simple question.
      <br>
      <br>
      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.
      <br>
      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.
      <br>
      What I need now is the distance in between the single measuring
      points while going downstream for modelling purposes.
      <br>
      <br>
      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.
      <br>
      <br>
      I looked into v.distance with the GRASS plug-in but that measures
      distances between two vector layers, right?
      <br>
    </blockquote>
    <br>
    You're on the right track: the v.distance module has a "to_along"
    option. Here's what you can do:<br>
    <br>
    First use the v.in.lines module to import the ascii GPS log points
    as a line feature. <br>
    v.in.lines gps_points.txt out=river_line fs=,  <br>
    # (comma separated?) <br>
    # 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<br>
    <br>
    Now add a column to the points table to accept the distance along
    the line:<br>
    v.db.addcol gps_points column="along double precision"<br>
    <br>
    Now run v.distance as:<br>
    v.distance from=gps_point to=river_line upload=to_along column=along
    out=connectors <br>
    # 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.  <br>
    <br>
    Cheers,<br>
    Micha<br>
    <blockquote cite="mid:4F8D19A7.6030609@monash.edu" type="cite">
      <br>
      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.
      <br>
      <br>
      Best regards,
      <br>
      Harald
      <br>
      <br>
      <br>
    </blockquote>
    <p><br>
    </p>
    <br>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
052-3665918
</pre>
  </body>
</html>