Mapweaver/OSRMW

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — Mapweaver/OSRMW
· Afrikaans · Alemannisch · aragonés · asturianu · Aymar aru · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · bamanankan · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · 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î · Latina · latviešu · Lëtzebuergesch · lietuvių · Limburgs · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Türkmençe · Vahcuengh · vèneto · walon · Wolof · Yorùbá · Zazaki · isiZulu · српски / srpski · авар · Аҧсшәа · башҡортса · беларуская · български · қазақша · Кыргызча · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · भोजपुरी · मराठी · संस्कृतम् · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް

A Mapweaver extension to draw routes between two points using OSRM as routing engine.

Changelog

v.0.1 Initial release

Installation

Compiling OSRM

Install dependencies: you'll need at least these packages

sudo apt-get install sparsehash libsparsehash-dev libboost-dev g++ libxml2 libxml2-dev scons libstxxl1 libstxxl-dev
scons

Assuming you have the last mapweaver (0.37+) in the folder ~/Desktop/mapweaver, download OSRM archive from http://sourceforge.net/projects/routed/files/ (wgetting them it's at own risk) and put in mapweaver folder, then unpack and build

cd ~/Desktop/mapweaver
tar xfvz osrm_0.2.tar.gz
cd osrm
scons

Perl modules

Download (see links at bottom) osrm.pm and osrmlib.pm in the SAME folder as OSRM executables (so ~/Desktop/mapweaver/osrm/) and osrmw_data.pl and osrmw.pl in the SAME folder as mw.pl (so ~/Desktop/mapweaver/).

One more step to go: install two perl modules

sudo cpan Geo::KML
sudo cpan Geo::Gpx

Preparing files for routing

Now it's time to make files for the Routing Machine. The osrmw package offers a script (osrmw_data.pl) which automates this process: call it with "perl osrmw_data.pl osmfile.osm" (where osmfile is the name of your osm file). In detail here's the steps:

1. `extractLargeNetwork osmfile.osm`

2. `createHierarchy osmfile.osrm`

3. edit server.ini with paths to these created files

Using osrmw.pl

The program needs three parameters:

--routed: Path to routed executable
--osrm : File.osrm (main file)
--nodes : OSM id of starting and ending node seperated by comma

Things which should be done

There are some things left:

  • provide a way to insert directly coordinates instead of nodes
  • allow to provide extra parameters for mapweaver [this is easily done by user-side customizing mwconfig.ini and mwstandardrules.txt]
  • remove gpx as default operation, leaving an option to mantain the file

Download