User Tools

Site Tools



Get extract

wget -O vienna.osm ",48.1,16.5,48.3"

Get statistics

wget -O - |cc -x c - -O3 -o osmfilter # found at 
./osmfilter estonia.osm --out-count



GPSBabel converts waypoints, tracks, and routes between popular GPS receivers and mapping programs. It also has powerful manipulation tools for such data. Install it

sudo aptitude install gpsbabel

General Information

gpsbabel understands lots of formats and supports lots of filter functions like removing duplicates, sorting waypoints etc. Look for the -x option in the man page.

It is written in C.


First a general note: GPSBabel distinguishes between routes, tracks and waypoints. So typically you will want to pass one of the following switches on the commandline

* -r Process route information * -t Process track information * -w Process waypoint information [default]

If you do a conversion and the output file is empty, it is most likely that you need to use a different of the above switches!


Convert GPX to CSV

gpsbabel -t -i gpx -f input.gpx -o unicsv -x track,course,speed -F output.csv

Add Speed and Course

If you are processing 'track information' use the switch

 -x track,course,speed

Converting GPS NMEA to GPX

 gpsbabel  -i nmea,date=20090601 -f input.nmea -x transform,wpt=trk -o gpx -F output.gpx


* a date (see example above) must be given if your GPS data doesn't contain one already. * wpt=trk creates waypoints out of tracks.

Download tracks from QStarz BT-Q1000

These tracking devices connect via USB. In Ubuntu 10.04 the device should be accessible at /dev/ttyACM0 by default.

Data can then be downloaded (details here):

gpsbabel -t -w -i mtk -f /dev/ttyACM0 -o gpx -F out.gpx

More documentation in gpsbabel's manpage and here.


The OSS mtkbabel (made using Perl) works with Mediatek mtk chipsets, which are eg. part of Qstarz tracking devices. Besides downloading data, allows for scriptable configuration of the device (control settings, change log file layout etc.)

sudo apt-get install mtkbabel


This Java tool aims to provide a GUI for GPS logging device configuration and log data handling. It is available for desktops and mobile devices.


Merge shapefiles

ogr2ogr merged.shp file1.shp                                    # create a copy of file1
ogr2ogr -update -append merged.shp file2.shp -nln merge         # append file2

Merge *.gpx into Shapefile

IFS=$(echo -en '\n')
for f in *.gpx
  ogr2ogr gpx.shp -append "$f" tracks -fieldTypeToString DateTime

Export layer from Geopackage to CSV

ogr2ogr -f CSV export.csv source_geopackage.gpkg layer_name -lco GEOMETRY=AS_XY
gis_tools.txt · Last modified: 2019/02/27 15:44 by mstraub