[GRASS-user] v.in.gpsbabel, Garmin USB and Macintosh

Dave Kent dkent at sasktel.net
Wed Sep 27 21:31:39 EDT 2006


I transferred the points in two steps.

Step 1.  Download from the GPS handheld to a file using GPSBabel+  
application for OSX.  This was the only way I could get a USB  
connection to work.   I used the 'Tracks' option from GPSBabel+ and  
file format GPX XML.  I cannot find an appropriate device name to  
download directly with v.in.gpsbabel.


Step 2.  Import the GPX file using v.in.gpsbabel.
When I do this without the '-t' flag, it imports points correctly but  
no tracks.

When I use the '-t' flag I get errors

Following is the terminal command and the first few lines of the  
error messages.


GRASS 6.3.cvs > v.in.gpsbabel -t input=/users/davekent/GarminGPX  
output=TestH format=gpx --overwrite

Downloading Tracks from GPS
'style=/Applications/Grass/GRASS.app/Contents/Resources/etc/ 
grass_write_ascii.style' is an unknown option to gpx.
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
/Applications/Grass/GRASS.app/Contents/Resources/scripts/ 
v.in.gpsbabel: line 481: ((: TO_READ=-: syntax error: operand  
expected (error token is "-")
/Applications/Grass/GRASS.app/Contents/Resources/scripts/ 
v.in.gpsbabel: line 460: ((: OFFSET=912-: syntax error: operand  
expected (error token is "-")
tail: option requires an argument -- n
usage: tail [-F | -f | -r] [-b # | -c # | -n #] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
/Applications/Grass/GRASS.app/Contents/Resources/scripts/ 
v.in.gpsbabel: line 481: ((: TO_READ=-: syntax error: operand  
expected (error token is "-")
/Applications/Grass/GRASS.app/Contents/Resources/scripts/ 
v.in.gpsbabel: line 460: ((: OFFSET=1206-: syntax error: operand  
expected (error token is "-")
tail: option requires an argument -- n
usage: tail [-F | -f | -r] [-b # | -c # | -n #] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]



Dave



On Sep 27, 2006, at 4:48 AM, Hamish wrote:

> Dave Kent wrote:
>> I had thought (and hoped) from the documentation that track data  
>> would
>> import as an arc.
>
> Yes, tracks and routes should import as an arc.
>
> You need to add a flag to gpsbabel to get a track, not points, did  
> you use
> the gpsbabel "-t" flag?
>
>
> from the script:
>
> # How to do it
> #
> # gpsbabel [options] -i INTYPE -f INFILE -o OUTTYPE -F OUTFILE
> # gpsbabel [options] -i INTYPE -o OUTTYPE INFILE [OUTFILE]
> #
> #(GPX file example):
> # gpsbabel -w -i gpx -o xcsv,style=grass_write_ascii.style outfile.csv
>
> ...
>
> if [ $CREATE_POINTS -eq 1 ] ; then
>     echo "Downloading Waypoints from GPS" 1>&2
>     gpsbabel -w -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o  
> xcsv,style="$STYLE" -F "$TMP".gpst
>     EXITCODE=$?
> else
>     if [ $RTE -eq 1 ] ; then
>         echo "Downloading Routes from GPS" 1>&2
>         gpsbabel -r -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o  
> gpx,style="$STYLE" -F "$TMP".gpx
>         EXITCODE=$?
>     fi
>     if [ $TRK -eq 1 ] ; then
>         echo "Downloading Tracks from GPS" 1>&2
>         gpsbabel -t -i $GIS_OPT_FORMAT $GPSdevice $PROGVERBOSE -o  
> gpx,style="$STYLE" -F "$TMP".gpx
>         EXITCODE=$?
>     fi
> fi
>
>
>
> Hamish




More information about the grass-user mailing list