GPS

From GRASS-Wiki
Jump to navigation Jump to search

GPS applications with GRASS

Tools

Import

  • v.in.gpsbabel: allows the user to import waypoint, route, and track data from a locally connected GPS receiver or a text file containing GPS data of many common formats.
- calls the GPS Babel software
  • v.in.garmin: allows the user to import from a Garmin device
- gardump from the garmin-utils package
- gpstrans software
  • v.in.ascii: allows the user to import generic points, lines or polygons from an ASCII file. Using v.in.ascii combined with gpsbabel, it's possible to import attribute columns from GPS units, that might otherwise get "lost" when using v.in.garmin. Here's a oneliner to pull waypoints from a usb connected GPS straight into a GRASS vector points map:
gpsbabel -w -i garmin -o unicsv -f USB: -F - | v.in.ascii out=gps_points fs=, column="num integer, y_coord double, x_coord double, elev double, date_str varchar(16), time_str varchar(16)" x=3 y=2 skip=1  

The gpsbabel output format "unicsv" creates a comma-separated-value table of all attributes from the GPS. The output is piped straight into the v.in.ascii command. The parameter "fs=," sets the field separator for the csv GPS output. Then the "column=..." parameter must be setup in the same format as the GPS output table. If the output isn't known, (or if you just want to save a text file of the gps data) then run gpsbabel saving the output to a file i.e. "-F points.txt" then examine the file to find the attribute columns. Finally, use the v.in.ascii "x=" and "y=" to set the correct column number for X and Y coordinates. Note that the GPS output is often in the "geographic" Lat-Lon order, which means Y first, then X. So be sure to choose the right column numbers for X (longitude) and Y (latitude).

Export

- calls the GPS Babel software

Tasks

Links

- see also the d.out.gpsdrive module