wget -O vienna.osm "http://www.overpass-api.de/api/xapi?map?bbox=16.25,48.1,16.5,48.3"
wget -O - http://m.m.i24.cc/osmfilter.c |cc -x c - -O3 -o osmfilter # found at http://wiki.openstreetmap.org/wiki/Osmfilter
./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
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!
gpsbabel -t -i gpx -f input.gpx -o unicsv -x track,course,speed -F output.csv
If you are processing
'track information' use the switch
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.
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.
ogr2ogr merged.shp file1.shp # create a copy of file1 ogr2ogr -update -append merged.shp file2.shp -nln merge # append file2
#!/bin/bash SAVEIFS=$IFS IFS=$(echo -en '\n') for f in *.gpx do ogr2ogr gpx.shp -append "$f" tracks -fieldTypeToString DateTime done IFS=$SAVEIFS
ogr2ogr -f CSV export.csv source_geopackage.gpkg layer_name -lco GEOMETRY=AS_XY