[GRASSLIST:9834] Re: GPS Tracklog points to lines (GPS Babel)

Dylan Beaudette dylan.beaudette at gmail.com
Sat Jan 14 17:48:27 EST 2006


On Jan 14, 2006, at 1:54 PM, Dave Sampson wrote:

> I find that often when using GPS tools and v.in.garmin I only have 
> success importing track logs as points. not as lines. When using 
> GPSMan I get lines but all the track logs compressed into one.
>

I, and many others on this list have had similar problems. I think that 
it has something to do with what your GPS is ouputting, and what 
gpsman/v.in.garmin is expecting. This may or may not be a bug in 
v.in.garmin ...? (Hamish.. ?)

In order to get lines from my tracklog, I have been using gpsman from 
the command like, dumping the result to a text file, and the processing 
this file with AWK to create a GRASS-compatible ascii formated file. 
Note that you might have to do some trimming of the output from gpsman, 
as it adds some extra information at the top of its output.

sample code

gpsman ....... > walk1.raw

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

i am then able to import the lines with

v.in.ascii in=walk1.ascii format=standard out=walk1


I know that it is possible to get tracklog _lines_ imported into GRASS 
via v.in.garmin , but it seemed like that functionality was broken 
sometime in the last 7 months or so.
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341




More information about the grass-user mailing list