Installation
June 28, 2024 ยท View on GitHub
Configuring Java Version
Compiling software that includes the OSHDB currently requires Java 17 or newer. Because maven projects use Java 1.5 by default, it is necessary to either configure your IDE accordingly or add the following compiler version to the properties section of your pom.xml file:
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
Option 1: Adding the OSHDB as a maven dependency
Simply add the OSHDB as a dependency to your pom.xml file. For most use cases this would be the oshdb-api:
<dependencies>
<dependency>
<groupId>org.heigit.ohsome</groupId>
<artifactId>oshdb-api</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>
Advanced users may also be interested in other packages like the oshdb package for raw data access.
Option 2: Building from Source
Alternatively, you may build OSHDB from source using maven. This option is more involved and requires more knowledge of building software with maven.
The basic steps are to clone this repository:
git clone https://github.com/GIScience/oshdb.git
and to build it with:
cd ./oshdb
mvn clean install
After that, the binaries will be available in the local maven directory. A new OSHDB-Project can be set up directly by defining the dependency as explained in the previous section option 1, step 2.