[GRASS-user] Calculating Length Between Points On Stream Network

Rich Shepard rshepard at appl-ecosys.com
Mon Mar 8 12:07:10 EST 2010


On Mon, 8 Mar 2010, Wolf Bergenheim wrote:

> The 'id' should not be the string 'id', but rather a unique IDentifier
> for each point. Usually you will want to use a running number, so that
> the first is 1 the second is 2 etc...
> Here is an example of 2 lines:
> 1 242856.60 431305.07 242551.88 432149.70
> 2 242866.60 431325.07 242550.88 432140.70

Wolf,

   What you show above is the same two points on both lines. I changed the
file 'nodes' to read:

1|242856.60|431305.07
2|242551.88|432149.70

   The command line is:

GRASS 6.4.0svn (oregonM):/usr4/grassbase > v.net.path in=abernethy_creek
out=stream_length type=line file=/usr4/grassbase/nodes --o

   Yet I still see:
...
Graph was built
WARNING: Wrong input format: 1|242856.60|431305.07
WARNING: Wrong input format: 2|242551.88|432149.70
WARNING: [2] input format errors

   I tried using v.in.ascii to add those two points to a file named
'startend', but when I specified that map name it apparently was not added
to the vector directory.

   What am I still doing incorrectly? Or, is there a different module that
will return the distance along the stream vector map between those two
defined points?

Thanks,

Rich




More information about the grass-user mailing list