v.out.gps
Exports a vector map to a GPS receiver or file format supported by GPSBabel.
v.out.gps [-wrt] input=name [type=string [,string,...]] output=name [format=string] [layer=string] [where=sql_query] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]
Example:
v.out.gps input=name output=name
grass.script.run_command("v.out.gps", input, type="point,centroid,line,boundary", output, format="gpx", layer="1", where=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("v.out.gps", input="name", output="name")
Parameters
input=name [required]
Name of input vector map
Or data source for direct OGR access
type=string [,string,...]
Input feature type
Allowed values: point, centroid, line, boundary
Default: point,centroid,line,boundary
output=name [required]
Name for output file or GPS device
format=string
GPSBabel supported output format
Default: gpx
layer=string
Layer number or name
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Default: 1
where=sql_query
WHERE conditions of SQL statement without 'where' keyword
Example: income < 1000 and population >= 10000
-w
Export as waypoints
-r
Export as routes
-t
Export as tracks
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
input : str, required
Name of input vector map
Or data source for direct OGR access
Used as: input, vector, name
type : str | list[str], optional
Input feature type
Allowed values: point, centroid, line, boundary
Default: point,centroid,line,boundary
output : str, required
Name for output file or GPS device
Used as: output, file, name
format : str, optional
GPSBabel supported output format
Default: gpx
layer : str, optional
Layer number or name
Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.
Used as: input, layer
Default: 1
where : str, optional
WHERE conditions of SQL statement without 'where' keyword
Example: income < 1000 and population >= 10000
Used as: input, sql_query, sql_query
flags : str, optional
Allowed values: w, r, t
w
Export as waypoints
r
Export as routes
t
Export as tracks
overwrite: bool, optional
Allow output files to overwrite existing files
Default: False
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
v.out.gps allows the user to export waypoint, route, and track data from a vector map into a locally connected GPS receiver or as a file in many common GPS data formats. Translation is done via the GPSBabel program.
Do not use as a primary means of navigation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License (GPL) for more details.
NOTES
v.out.gps automatically reprojects data from the projection settings of the current location to Lat/Lon WGS84.
GPX format is used for data interchange between GRASS and GpsBabel. If
the requested output is GPX, then gpsbabel
is never run.
OGR's GPX driver knows a number of standard field names. If an attribute
column matches the name it will be used in that field. Otherwise the
attribute will be placed within the <extensions>
metadata section of
the record. Not all fields names are used with all feature types (e.g.
DOP fix error is not meaningful for route lines). You can use the
v.db.renamecolumn module to rename columns.
These are the standard GPX data fields known to OGR:
ageofdgpsdata
cmt: Comment
course
desc
dgpsid: DGPS station type
ele: Elevation
fix
geoidheight
hdop: Horizontal dillution of precision (estimated fix error)
magvar: Magnetic variation
name
number
pdop: Positional dillution of precision (estimated fix error)
route_fid
route_point_id
sat
speed
src
sym
time
track_fid
track_seg_id
track_seg_point_id
type
url
urlname
vdop: Vertical dillution of precision (estimated fix error)
EXAMPLES
GPX Export
Export a vector lines map to a GPX track file:
v.out.gps -t input=trail output=trail.gpx
GPS device connected via USB adapter
Export vector maps named waypoints, tracks, routes to a Garmin GPS connected to /dev/ttyUSB0:
v.out.gps -w input=waypoints format=garmin output=/dev/ttyUSB0
v.out.gps -t input=tracks format=garmin output=/dev/ttyUSB0
v.out.gps -r input=routes format=garmin output=/dev/ttyUSB0
SEE ALSO
m.proj, v.in.ascii, v.out.ascii, v.db.renamecolumn, v.extract
GpsBabel.org
The GDAL/OGR GPX format
page
cs2cs from PROJ.4
AUTHOR
Hamish Bowman, Dunedin, New Zealand
SOURCE CODE
Available at: v.out.gps source code
(history)
Latest change: Thursday Mar 20 21:36:57 2025 in commit 7286ecf