sly
14
Even if you found your solution, in case someone is reading this thread later, I propose another solution to draw gpx tracks by inserting them in postgres/postGIS
( The advantage I see Is that you can create more complex queries to draw what you want, draw more tracks faster, …)
- Convert all your gpx tracks to shape files
- Use shp2pgsql to import them in your database
- define a mapnik style+layer with srs=“+proj=latlong +datum=WGS84”
you’r done.
Here was my script to do the whole import (in a directory with 6,000 paragliding tracks in IGC format :
( First you need to prepare the table with -p option of shp2pgsql )
#!/bin/bash
for x in *.igc ; do
FILE=echo $x | sed s/".igc"//
gpsbabel -i igc -f $FILE.igc -o gpx -F $FILE.gpx
gpx2shp $FILE.gpx > /dev/null 2>/dev/null
shp2pgsql -a -g way “$FILE”_trk.shp cfd 2>/dev/null | psql gis_france > /dev/null 2>/dev/null
done
Here is my simple style+layer :
#bd42f6
1
0.5
cfd
postgis
LOGIN
PASSWORD
DB
(select way from cfd) as cfd
-180,-89.99,180,89.99
Here is the result :
http://beta.letuffe.org/?zoom=11&lat=45.75594&lon=6.27156&layers=0000000B00FFFFFFT