Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ android/libs/graphhopper-*-android.jar
*/nbactions.xml
.idea/
*iml
debug.sh
debug.sh
*.dem
14 changes: 14 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
<comments>A business-friendly OSS license</comments>
</license>
</licenses>
<repositories>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>

<dependencies>

<!-- Trove is LGPL and slightly big (~3MB) -->
Expand Down Expand Up @@ -67,6 +75,12 @@
<artifactId>osmosis-osm-binary</artifactId>
<version>0.43.1</version>
</dependency>

<dependency>
<groupId>javax.media.jai</groupId>
<artifactId>com.springsource.javax.media.jai.core</artifactId>
<version>1.1.3</version>
</dependency>
</dependencies>

<build>
Expand Down
23 changes: 22 additions & 1 deletion core/src/main/java/com/graphhopper/GraphHopper.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static void main( String[] strs ) throws Exception
// for graph:
private GraphStorage graph;
private String ghLocation = "";
private String demLocation = null;
private DAType dataAccessType;
private boolean sortGraph = false;
boolean removeZipped = true;
Expand Down Expand Up @@ -240,6 +241,23 @@ public String getGraphHopperLocation()
return ghLocation;
}

public String getDemLocation()
{
return demLocation;
}

/**
* Sets the location where DEM files are stored and activates DEM processing for import
* of elevation data.
* <p/>
* @param demLocation
*/
public GraphHopper setDemLocation( String demLocation )
{
this.demLocation = demLocation;
return this;
}

/**
* This file can be an osm xml (.osm), a compressed xml (.osm.zip or .osm.gz) or a protobuf file
* (.pbf).
Expand Down Expand Up @@ -362,6 +380,8 @@ public GraphHopper init( CmdArgs args ) throws IOException
workerThreads = args.getInt("osmreader.workerThreads", workerThreads);
enableInstructions = args.getBool("osmreader.instructions", enableInstructions);

demLocation = args.get("osmreader.demlocation", demLocation);

// index
preciseIndexResolution = args.getInt("index.highResolution", preciseIndexResolution);
return this;
Expand Down Expand Up @@ -427,7 +447,8 @@ protected OSMReader importOSM( String _osmFile ) throws IOException
logger.info("start creating graph from " + osmFile);
OSMReader reader = new OSMReader(graph, expectedCapacity).
setWorkerThreads(workerThreads).
setEncodingManager(encodingManager).
setEncodingManager(encodingManager).
setDemLocation(demLocation).
setWayPointMaxDistance(wayPointMaxDistance).
setEnableInstructions(enableInstructions);
logger.info("using " + graph.toString() + ", memory:" + Helper.getMemInfo());
Expand Down
Loading