[GRASS-user] Create a line from 2 points

Alex Mandel tech_dev at wildintellect.com
Thu Feb 4 06:42:01 EST 2010


Hamish wrote:
> 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
> 
> 
I noticed that functions is only listed in 6.5. Will it work against
6.4. It seems like it should work even though there seems to be a little
back bending to have to export and the import again.
I'll probably just prepare it in SQL to begin with. Would v.in.ascii
work on an sqlite table or does it have to be a text file?

Thanks,
Alex



More information about the grass-user mailing list