Hey guys, if you install Mapnik 0.6.0 (the latest release) you can render directly from the GPX files.
Mapnik can do this through the OGR plugin, so just compile Mapnik with…
$ python scons/scons.py PLUGINS=all
which will enable the ogr and other plugins (only shape,postigis, and raster are default)
Then create a new OGR datasource like:
lyr.datasource = OGR(file=‘/home/pberck/GPS/20080808_trk_edg.gpx’,layer=‘tracks’)
you can get a sense of how to control with gpx layer is used by running the ‘ogrinfo’ command on your gpx file, eg:
$ ogrinfo test_point_line.gpx
Had to open data source read-only.
INFO: Open of test_point_line.gpx' using driver GPX’ successful.
1: waypoints (Point)
2: routes (Line String)
3: tracks (Multi Line String)
4: route_points (Point)
5: track_points (Point)