Skip to content

Instantly share code, notes, and snippets.

For an overview of which tags are used. See this issue for the discussion.

Nodes:

Tag Used Description
barrier Yes depending on the vehicle the tag is used to change access
crossing soon crossing=* and level_crossing=railway is stored in crossing
crossing:markings soon stored in crossing
fords Yes stored in road_environment
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Received: from CIATMB2.CIAT.CGIARAD.ORG ([fe80::3d36:2c21:c794:d6a6]) by
CIATHUB2.CIAT.CGIARAD.ORG ([198.93.225.118]) with mapi id 14.03.0158.001;
Sun, 26 Jan 2014 20:23:41 -0500
From: "Jarvis, Andrew (CIAT-CCAFS)" <redacted>
To: Peter Karich <redacted>
Hi peter,
Apologies for delay getting back to you. Your proposed use is fine, so tak=
@karussell
karussell / ReadGHFile.java
Last active January 19, 2022 15:05
read header entries of any file from GraphHopper without dependencies
import java.io.RandomAccessFile;
class ReadGHFile {
public static void main(String[] args) throws Exception {
String name = args[0];
RandomAccessFile raFile = new RandomAccessFile(name, "r");
raFile.seek(0);
if (raFile.length() == 0) throw new IllegalArgumentException("empty file " + name);
diff --git a/src/api/Api.ts b/src/api/Api.ts
index 9a56a8b..010d08a 100644
--- a/src/api/Api.ts
+++ b/src/api/Api.ts
@@ -154,7 +154,7 @@ export class ApiImpl implements Api {
optimize: 'false',
points_encoded: true,
snap_preventions: ['ferry'],
- details: ['road_class', 'road_environment', 'surface', 'max_speed', 'average_speed'],
+ details: ['road_class', 'road_environment', /*'surface',*/ 'max_speed', 'average_speed'],
@karussell
karussell / OffheapUrlDataAccess.java
Created September 18, 2021 09:08 — forked from jtheuer/OffheapUrlDataAccess.java
Graphhopper offheap storage with URL loader.
import com.google.common.base.Preconditions;
import com.graphhopper.storage.DAType;
import com.graphhopper.storage.DataAccess;
import com.graphhopper.util.NotThreadSafe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xerial.larray.LByteArray;
import xerial.larray.japi.LArrayJ;
import java.io.ByteArrayInputStream;
#FROM openjdk:11.0-jre
FROM openjdk:16-alpine3.13
COPY web/target/graphhopper*.jar ./graphhopper.jar
ENTRYPOINT [ "java -Xmx1g -Xms1g -jar graphhopper.jar", "10" ]

Custom Models

Currently available for the POST /route endpoint only and up on request. If you are interested - send us a support request.

Examples can be found here. You'll also find a link to a demo server including an editor with the JSON format that will check the syntax of your custom model and mark errors in red. You can press Ctrl+Space or Alt+Enter to retrieve auto-complete suggestions. Pressing Ctrl+Enter will send a routing request for the custom model you entered.

GraphHopper provides an easy-to-use way to customize its route calculations: custom models allow you to modify the default routing behavior by specifying a set of rules in JSON language. A simple example using the profile name of your choice or communicated from our support: