I want to pass some instructions on how to reach a certain place to friends. Several routes are available with advantages and disadvantages (like shortest route, fastest route, prettiest route, most fun route,...).

A simple solution would be to download the map tiles and then use a graphic editor such as gimp and add a transparent colored line covering the routes I recommend. Then I can share the resulting image file and I have the desired effect. The problem is, that I need to repeat this task over and over if the map updates (at least if I want my map to be up to date as well) and people can't scroll or zoom.

Next solution would be to create a little html/javascript page that uses OpenLayers. But then I need a gpx-trace for all the routes. Where get those from short of driving the entire routes again? After all OSM has all the traces. I played with JOSM a little to figure out whether I can export some roads as GPX, but I could only figure out how to export entire layers which is clearly to much. Does anyone know a tool for extracting GPX files for a certain route from OSM?

I am open for other ideas as well.

asked 14 Sep '11, 19:52

yankee's gravatar image

accept rate: 0%

I know the present OSM html renderer is tile-based, but from potlach for instance, could we print the webpage to a vectorial pdf? If yes then one then can reedit this with any serious vector drawing application (ie, capable to "eat" vector pdf), just highlighting the ways of interest and changing their draw attributes...

Another point: did you check all the open OSM-based routers around, which may offer you up-to-date pages with the right routing preset?

(15 Sep '11, 13:31) Herve5

@Herve5: yournavigation.org partially does not place the overlay over the road for some reason, on maps.cloudmade.com the target road is not in so far (it's obviously not through the tile cache since parts a visible on some zoom levels, even though I added the road in April), I could not get roadee.net to calculate any route at all, MapQuest is ok, except for one road which involves a track (MapQuest refuses to use that track). Any more proposals?

(15 Sep '11, 18:23) yankee

Have you tried openrouteservice.org? To route over tracks, you would need to choose the Pedestrian or Bicycle Profile. Besides GPX download you could also simply send a "Route link".

(17 Sep '11, 14:49) ikonor
(18 Sep '11, 19:45) Herve5

You could get the whole layer into JOSM, select your route, then make an inverse selection so everything else is selected. Now go to EDIT->PURGE (do NOT DELETE instead) and export the result as GPX.

Btw.: I doubt you would have to change your GIMP-overlay very often. Mostly the route overlay would not change when the map slightly changes (simply keep the layers separate and exchange the map underneath), but I agree that an openlayers overlay is nicer.


answered 15 Sep '11, 23:04

dieterdreist's gravatar image

accept rate: 3%


OK, well... That IS a lot of work! But it works! So here's the stuff in more detail: 1. Select all ways to be included (possibly have to split ways) 2. Edit->Search->"child selected" to select the nodes for the ways as well. Check "add to selection". 3. Edit->Search->"-selected" to inverse selection. Check "replace selection". 4. Edit->Purge 5. Right click the data layer->export to GPX 6. Follow these instructions to display the track: http://wiki.openstreetmap.org/wiki/Openlayers_Track_example

(16 Sep '11, 12:25) yankee
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 14 Sep '11, 19:52

Seen: 3,443 times

Last updated: 18 Sep '11, 19:45

powered by OSQA