I want to show a number of GPX files in a TileMill map. Here's the process that I thought would work:
- gpsbabel -i gpx -f "$myfile" -o kml,lines=1 -F "$myfile.kml"
- Add as layer in Tilemill, style with
line-width: 2;
and voila.
But no. Only points are being rendered, not the lines between them.
The generated .kml files contain <linestring>
elements, which I would have thought is the key:
<Placemark>
<name>Path</name>
<styleUrl>#lineStyle</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
146.153490,-38.211270
Is the problem a shortcoming at the TileMill end, or something in how I'm converting the files? Unfortunately none of the other formats supported by TileMill (GeoJSON, Shapefiles...) are supported by GPSBabel.
Other options? I'm using PostGIS, so a way to load them straight into the database would also be fine.