[GRASS-user] Converting points to lines

Dylan Beaudette dylan.beaudette at gmail.com
Fri Dec 8 13:45:43 EST 2006


here are the examples I was thinking of:

awk 'BEGIN{print "VERTI:"; n = 0} {vertex = $6" "$7; if(  (n > 0 && n < 3) ) 
{print "L 2\n"old_vertex"\n"vertex} else if(n >2
 ) {print "L 2\n"old_vertex"\n"vertex}; old_vertex = vertex; ;n++}' walk1.raw 
> walk1.ascii


#save CAT in third column
awk 'BEGIN{print "VERTI:"; n = 0} {vertex = $6" "$7; if(  (n > 0 && n < 3) ) 
{print "L 2\n"old_vertex" " n"\n"vertex,n+1} els
e if(n >2 ) {print "L 2\n"old_vertex" "n" \n"vertex,n+1}; old_vertex = 
vertex; ;n++}' walk1.raw


v.in.ascii in=walk1.ascii out=walk1_line fs=" " format="standard" columns='x 
double precision,y double precision, cat int' ca
tcol=0


note that 'walk1.raw' is a dump from a garmin gps 12 - via gpstrans.

cheers,

Dylan

On Thursday 07 December 2006 22:26, Dylan Beaudette wrote:
> Hi Bob,
>
> searching the archives reveals something posted by myself sometime
> ago. note that it was somewhat of a hack using awk:
>
> http://grass.itc.it/pipermail/grassuser/2005-March/028092.html
>
> cheers,
>
> dylan
>
> On 12/7/06, Bob Cooper <bcoop at neaq.org> wrote:
> > Hi,
> > 6.2 is beautiful work.
> > I have just upgraded to 6.2 from 5.4 on Linux. Is there a way to convert
> > a points vector (imported sites file from 5.4) to a line vector?
> >
> > Thanks,
> >
> > Bob Cooper
> >
> >
> > _______________________________________________
> > grassuser mailing list
> > grassuser at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grassuser

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list