Installing Routino under OSX

October 29, 2012
By

(This article was first published on Alex Singleton - R, and kindly contributed to R-bloggers)

Routino is a set of libraries that enable road based route calculations to be conducted over OpenStreetMap data. I have been using them extensively over the past six months for a project looking at CO2 emissions and the commute to school.

Although Routino was designed to run under Linux, it can also be compiled and installed under OSX (sorry no windows!).

  1. First download and unzip the latest version of Routino from here.

  2. Ensure that Xcode and the Xcode command line tools are both installed. On Xcode 4.5 the command line tools can be installed from within Xcode through Xcode >>> Preferences >>> Downloads tab >>> Click “install”.

  3. Navigate to the downloaded Routino folder using the terminal and compile the source code using a “make” command. You would need to supplement “alex” in the following commands for you own user account name.

cd /Users/alex/Desktop/routino-2.3.2/
make

The result should be a series of messages printed to the terminal that indicate Routino being compiled correctly.

  1. The next stage is to copy the compiled libraries (found in the /web/bin folder into your usr/bin folder which should appear in your system PATH (You can check if this is the case by running echo $PATH from the terminal). The -R and the fact that bin ends with a “/” mean that the contents of the folder are copied rather than the folder itself.
sudo cp -R  /Users/alex/Desktop/routino-2.3.2/web/bin/ /usr/bin/

To check that this has worked, if you enter “planetsplitter” or “router” on the terminal the input parameters of these tools should be printed.

For more information on use of the programme, see the Routino documentation here.

The only issue I have had with Routino is that occasionally I would get implausible and very long routes calculated. It turned out that this was related to an issue in the underlying OSM data where access by foot wasn’t necessarily specified on “trunk” roads. A work around for this was to specify that pedestrians could walk on these routes using the tagging rules in the specification XML files. The results of these changes can be seen in the following map.

To leave a comment for the author, please follow the link and comment on their blog: Alex Singleton - R.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)