Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (13 sloc) 909 Bytes

GPX Planet to PostgreSQL

This is a simple tool that stores GPX dump in a PostgreSQL database with PostGIS extension.


Run -h to see the list of options. The following command imports a test GPX dump, creating (or recreating) tables, asking for password and reprojecting coordinates to EPSG:900913 for usage with an example mapnik style:

xzcat gpx-planet-test-003.tar.xz | -w -c -9 -f -

This script will skip tracks with IDs already in the database, so if it's stopped, the processing could be resumed with the same command (bar -c switch, of course).

The 391 MB xzipped test data needed 1098 MB in a database, so one can expect only tripling in size, not hundreds of gigabytes.

Example Mapnik Style

See mapnik-gpx.xml for an example of a rendering style for imported GPS traces.


This script was written by Ilya Zverev and licensed WTFPL.