[GRASSLIST:7975] Re: v.out.ascii - vertices in a line

Maciek Sieczka werchowyna at epf.pl
Thu Aug 18 16:31:15 EDT 2005


Dylan

Thanks! I'm not familiar with the GPS points data format, so could I ask you 
to post a few lines of your input and output for me to understand your sript 
better?

Maciek

----- Original Message ----- 
From: "Dylan Beaudette" <dylan at iici.no-ip.org>
To: "Maciek Sieczka" <werchowyna at epf.pl>
Cc: <GRASSLIST at baylor.edu>
Sent: Wednesday, August 17, 2005 11:25 PM
Subject: [GRASSLIST:7961] Re: v.out.ascii - vertices in a line


> On Wednesday 17 August 2005 12:27 pm, Maciek Sieczka wrote:
>> Hi
>>
>> I need to craft an ascii vector file, where the first and last vertex are
>> given in one line, like in this example:
>>
>> 885.824 634.545 874.954 452.858
>> 874.954 452.858 910.670 327.075
>> 910.670 327.075 1013.160 219.927
>>
>> instead of what v.out.ascii  format=standard gives:
>>
>> 885.824 634.545
>> 874.954 452.858
>> 910.670 327.075
>> 1013.160 219.927
>>
>> How can I do it? Please help me.
>>
>> Maciek
>
> my first thought is awk ...
>
> v.out.ascii | awk '{script here}'
>
> i have done the opposite -- convert x,y into line segment data from GPS
> points.
> here is how i did it (rather hackish...) walk1.raw contained x,y pairs.
>
> --------------------
> 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
> -----------
>
> then imported walk1.ascii with v.in.ascii
>
>
> also, Hamish  once suggested looking at the v.in.garmin.sh script for 
> ideas...
>
> -- 
> Dylan Beaudette
> Soils and Biogeochemistry Graduate Group
> University of California at Davis
> 530.754.7341
>
> 




More information about the grass-user mailing list