## OSM2NetworkDataset Installation

OSM2NetworkDataset requires the following conditions:

• Java version (tested with Java 6)
• ArcGIS 9.3.1 or 10.0 (depending on the release) with ArcObjects for Java

The application is a jar file and uses classes and interfaces of ArcObjects. ArcObjects is often located in the following directory:

• C:\Program Files\ArcGIS\java\lib\arcobjects.jar (ArcGIS 9.3.1)
• C:\Program Files (x86)\ArcGIS\Desktop10.0\java\lib\arcobjects.jar (ArcGIS 10.0)

It is recommended to generate a batch file to execute the program:

### Console Application

Batch file schema:

```        <path to java> -cp <path to arcobjects.jar>;<path to osm2nds_ArcObjects_x_console_x_x.jar>
org.n52.osm2nds.core.userinterface.console.Main <path to the OSM file> <path to the parameter file>
<path to the output directory> <name of the region> <path to the log file>
PAUSE```

The batch file consists of only two lines: PAUSE is the second line!

The fifth argument (path to the log file) is optional.

The following code is an example for a batch file for the console application:

```        "C:\Program Files\Java\jre6\bin\java" -cp "C:\Program Files\ArcGIS\java\lib\arcobjects.jar";
"C:\Program Files\osm2nds\osm2nds_ArcGIS_10.0_console_1.1.jar" org.n52.osm2nds.core.userinterface.console.Main
C:\Data\Muenster\Muenster.osm C:\Data\Muenster\Parameters.xml C:\Data\Muenster\ Muenster
C:\Data\Muenster\Muenster.log
PAUSE```

### GUI Application

Batch file schema:

```        <path to java> -cp <path to arcobjects.jar>;<path to osm2nds_ArcObjects_x_gui_x_x.jar>
org.n52.osm2nds.core.userinterface.gui.Main
PAUSE```

The batch file consists of only two lines: PAUSE is the second line!

The arguments mentioned above (Console Application) can also be used for the GUI application. Then these arguments are used to fill the form (see figure 1).

Figure 1: Form of the GUI application

If you always want to use the same parameter file in the GUI application, you could preconfigure this argument:

```        "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
"" C:\Data\Muenster\Parameters.xml
PAUSE```

### Extend the Heap Size

It may happen that the standard heap size of Java is not enough. This is true if the OSM file is too big. In this case, you can adapt the maximum heap size. To do this, you have to add e.g. -Xmx1024m in front of the parameter -cp. -Xmx1024m means 1024 MB. The maximum possible heap size depends on the system.