Skip to content

v.in.gps

Import waypoints, routes, and tracks from a GPS receiver or GPS download file into a vector map.

v.in.gps [-wrtpk] input=name output=name [format=string] [proj=string] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

v.in.gps input=name output=name

grass.script.run_command("v.in.gps", input, output, format="gpx", proj=None, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("v.in.gps", input="name", output="name")

Parameters

input=name [required]
    Device or file used to import data
output=name [required]
    Name for output vector map
format=string
    GPSBabel supported output format
    Default: gpx
proj=string
    Projection of input data (PROJ.4 style), if not set Lat/Lon WGS84 is assumed
-w
    Import as waypoints
-r
    Import as routes
-t
    Import as tracks
-p
    Force vertices of track or route data as points
-k
    Do not attempt projection transform from WGS84
--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
    Device or file used to import data
    Used as: input, file, name
output : str, required
    Name for output vector map
    Used as: output, vector, name
format : str, optional
    GPSBabel supported output format
    Default: gpx
proj : str, optional
    Projection of input data (PROJ.4 style), if not set Lat/Lon WGS84 is assumed
flags : str, optional
    Allowed values: w, r, t, p, k
    w
        Import as waypoints
    r
        Import as routes
    t
        Import as tracks
    p
        Force vertices of track or route data as points
    k
        Do not attempt projection transform from WGS84
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.in.gps 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. Translation is done via the GPSBabel program.

This software is not intended as a primary means of navigation.

NOTES

v.in.gps automatically reprojects data using the projection settings of the current location. The default input data projection is lat/lon WGS84. If your GPS outputs data using another projection or map datum, you may include the PROJ parameters defining your projection in the proj option and v.in.gps will reproject your data accordingly. Great care must be taken to get these parameters correct! The automatic transform may be skipped by using the -k flag in which case the data will be imported unprojected, as it appears in the input.

Route and Track data may be uploaded as a series of points by using the -p flag, otherwise they will be imported as lines. You can run v.in.gps multiple times and merge the line and point vectors with the v.patch command if you want, but take care when merging dissimilar attribute tables.

EXAMPLES

GPS device connected via USB adapter

Import waypoints, tracks, routes from /dev/ttyUSB0 and save to a GRASS vector map:

v.in.gps -w input=/dev/ttyUSB0 format=garmin output=waypoints
v.in.gps -t input=/dev/ttyUSB0 format=garmin output=tracks
v.in.gps -r input=/dev/ttyUSB0 format=garmin output=routes

GPS device connected via serial adapter

Import waypoint data from a Garmin GPS connected at /dev/ttyS0 and save to a GRASS vector map named waypoints:

v.in.gps -w input=/dev/ttyS0 format=garmin output=waypoints

Import track data from a GPX

Import track data from a GPX text file and save to a GRASS vector map named tracks.

v.in.gps -t input=gpslog.gpx format=gpx output=tracks

Import route data from GPS connected at /dev/gps

Import route data as a series of points from a Garmin GPS connected at /dev/gps and save to a GRASS vector map named routePoints:

v.in.gps -r -p file=/dev/gps format=garmin output=routePoints

SEE ALSO

db.execute, v.in.ascii, v.in.garmin, v.db.connect, v.patch gpsbabel from gpsbabel.org
cs2cs from PROJ

AUTHORS

Claudio Porta and Lucio Davide Spano, students of Computer Science at University of Pisa (Italy).
Commission from Faunalia Pontedera (PI)

Based on v.in.garmin for GRASS 6.0 by Hamish Bowman
and v.in.garmin.sh for GRASS 5 by Andreas Lange

SOURCE CODE

Available at: v.in.gps source code (history)
Latest change: Thursday Feb 20 13:02:26 2025 in commit 53de819