I have a request to provide GPX files of certain trails (around 100) that are present in OpenStreetMap. Given a local PostGIS install with OSM data, I think the process would be something like:
- Define query to select the correct features, with appropriate metadata
- Extract those features as shapefiles
- Convert the shapefiles to GPX
Is this on the right track? Would a different format (KML, GeoJSON...) be better?
If this is the right way:
Step 1: Straightforward enough, I think.
Step 2: Using ogr2ogr with the postgis option? (eg http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet)
Step 3: The only command line tool I could find, shp2gpx, doesn't seem to be available for download. Is there something else that could do the job?
Just wanted to check whether this is a sensible approach, and that there isn't an easier way, before I dive in.