[GRASS-user] Create a line from 2 points

Hamish hamish_b at yahoo.com
Wed Feb 3 06:15:28 EST 2010


Alex wrote:
> Given sets of points with the same category what command would I use to
> turn each set into a line? Does v.build.polylines work in
> this case?
> 
> These seems like a common thing to do, but I can't seem to
> find any examples.


have a look at the brand new script "v.in.lines"

the order of the points you feed it is important.

use 'v.out.ascii where="cat = $n"' to select points by category. for
multiple cats you can pipe that directly into v.in.lines in a loop.

Get list of valid cats for the loop with:
  v.category $MAP option=print | sort -n | uniq


Hamish



      


More information about the grass-user mailing list