OpenStreetMap to ArcGIS Network Analyst

Over some years, I have seen that many people are looking for ways to get started with the network analysis in ArcGIS. However, some may not have access to a properly prepared routing dataset, which can be used directly in ArcGIS by using the Network Analyst extension. I have blogged a bit on various street data sources before, so, by now, you should have a good idea about where to look for street data.

A couple of days ago, I found a very interesting resource on how to process the OpenStreetMap data in order to get a routable network dataset which can be used for network analysis purposes directly in ArcMap. The tools are available at the 52° North web site, the open source software initiative, and were written by Eva Peters.

After using the tools for some time and testing them extensively during some evenings (I’ve compiled some nice network datasets over Swedish metropolitan areas), I’ve decided to summarize how to use them to help those who want to get their hands on a properly configured ArcGIS network dataset for their geographic area, in order to learn how various Network Analyst solvers work.

Prerequisites:

  • ArcGIS 9.3.1 or 10.0 installed (either license would work – ArcView, ArcEditor or ArcInfo. You can even use your ArcGIS Engine license, if you have one). If you don’t have ArcGIS installed yet plan to install one, check the Esri system requirements page.
  • ArcObjects .SDK for Java 9.3.1 or 10.0 installed. If you don’t have SDK installed yet plan to install one check the Esri system requirements page. Since you are not going to develop anything with the ArcObjects SDK for Java for now, you don’t really need to install JDK (Java Development Kit). In fact, you can install JRE (Java Runtime Environment).
  • JRE is required. This can be downloaded from the Oracle web site. The version JRE6 has been tested by Eva, so why not download the jre-6u31-windows-i586.exe package there. I’ve used this one, too.

This is pretty much it.

After you’ve installed the software we need, just do a couple of checks to see that everything is alright.

  1. Start ArcMap to see that the installation went well.
  2. Check that the Java installation is OK: open the cmd and enter “java –version” to check if Java works fine. You should get a message like this:

C:\Documents and Settings\Administrator>java -version
java version “1.6.0_31”
Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

  1. Download the tool from the 52 North web site. The tool itself is a .jar file (Java ARchive) which you can think of as a kind of .exe file in Windows. You will run this .jar file much like you would do with the .exe file. The easiest way to run the tool is to use a batch file (with the .bat extension), which will refer to the ArcObjects Java libraries we need and Java itself.
  2. Create a .bat file by using any text editor like Notepad (I like Notepad2). Enter this text into the .bat file:

“C:\Program Files\Java\jre6\bin\java” -cp “C:\Program Files\ArcGIS\java\lib\arcobjects.jar”;”C:\Program Files\osm2nds\osm2nds_ArcGIS_10.0_gui_1.1.jar” org.n52.osm2nds.core.userinterface.gui.Main

PAUSE

Where:

  • “C:\Program Files\Java\jre6\bin\java” is the default path to the Java installation folder
  • If using ArcGIS 9.3.1 – “C:\Program Files\ArcGIS\java\lib\arcobjects.jar” or
  • If using ArcGIS 10.0 – “C:\Program Files\ArcGIS\Desktop10.0\java\lib\arcobjects.jar” is the default path to the ArcObjects for Java installation folder
  • C:\Program Files\osm2nds\osm2nds_ArcGIS_10.0_gui_1.1.jar” is the path to the folder where you saved your tool downloaded from the 52North page.

Don’t forget that the path may vary depending on the Windows version used (in 64-bit Windows you would get ArcObjects installed in the “Program Files (x86)” folder).

You can find more notes on the installation and running the tool at the 52 North web page, if needed, since this post is just a brief overview. Let me know what you think about the tools and whether this is something useful!

Advertisements

2 thoughts on “OpenStreetMap to ArcGIS Network Analyst

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s