JOSM/Plugins/Routing

From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to: navigation, search
Available languages — JOSM/Plugins/Routing
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
Screenshot of the JOSM routing plugin

Routing

Provides routing capabilities to JOSM. This plugin is based on JGraphT and uses some code from the former navigator plugin by Christof Dallermassl.

Usage

After the plugin is installed and enabled, a new menu Routing appears.

Once an OSM data layer is open, routing layers can be added using the menu option "Add routing layer". This layer is linked with the current OSM layer, thus the name of the layer states "Routing [name_of_data_layer]". A set of tool buttons is created. Routing layers can also be removed with through the layer's context menu, or when the associated OSM layer is removed.

Selecting destinations

This plugin supports multi-destination routing. When adding, removing or moving route nodes, the Routing Layer has to be selected.

The left toolbar (Or Edition Toolbar) has to be enable (Menu View > Edition Toolbar) because actually there is the only place where the Add, Delete and Move Buttons appear. Routing add button.png

The "Add destination" button is used to add nodes to the route. You can add as many route nodes as you want. The route is computed on the fly, as you add new nodes to it. Only nodes belonging to ways tagged with a "highway" key can be used for routing. When clicking on the map, the closest highway node will be selected.

The "Delete destination" button lets you remove a node from the route. Click on a destination to remove it from the map, the route will be computed again.

The "Move destination" button lets you move a node of the route from one place to another. Click on a destination and drag, the route will be recomputed when you release the mouse button.

Selecting routing criteria

Using the Routing menu you can switch between "shortest" and "fastest" route. Using a shortest criterion, all the values from the routing profile will be ignored, while using a fastest criterion the highway speeds from the routing profile will be used to compute the route.

There's also an option to ignore oneway tags. This option is useful to simulate pedestrian behavior.

Editing routing profile

The routing profile tells the routing engine which is the speed for each type of highway. It is accessed from the Preferences dialog.

Source code

Source code is available through the openstreetmap repository where plugin sources are hosted.

http://svn.openstreetmap.org/applications/editors/josm/plugins/

TODOs

  • Use restrictions for routing
  • User creation and management of routing profiles
  • Enable using more than one routing layer (done)
  • Exporting to GPX
  • Generation of driving (or walking) textual directions
  • Add new algorithms
    • Traveling salesman
    • Accessibility analysis (shortest path tree)

External References