From GRASS-Wiki
Jump to: navigation, search

GPS applications with GRASS



  • 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
  • allows the user to import from a Garmin device
- gardump from the garmin-utils package
- gpstrans software
  • allows the user to import generic points, lines or polygons from an ASCII file. Using combined with gpsbabel, it's possible to import attribute columns from GPS units, that might otherwise get "lost" when using 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 - | 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 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 "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).


  • v.out.gpsbabel: allows the user to export waypoints, route and track data to a locally connected GPS receiver.
- calls the GPS Babel software


- first of all, be sure that your device interface is setup to serial garmin mode; for this, on your device go to >Menu > Setup > Interface
- before plugging, load the drivers so that the device can be connected:
sudo modprobe garmin_gps
- then plug your Garmin GPS-device to your computer
- import waypoints into GRASS (assuming that your GPS is mounted to /dev/ttyUSB0): -w input=/dev/ttyUSB0 format=garmin output=waypoints
- export a point vector as waypoints to your GPS:
v.out.gpsbabel -w input=villages format=garmin output=/dev/ttyUSB0


- see also the d.out.gpsdrive module