Skip to content

Instantly share code, notes, and snippets.

View customizable-routing2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CGIAR.txt
Received: from CIATMB2.CIAT.CGIARAD.ORG ([fe80::3d36:2c21:c794:d6a6]) by
CIATHUB2.CIAT.CGIARAD.ORG ([]) 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 /
Last active January 19, 2022 15:05
read header entries of any file from GraphHopper without dependencies
class ReadGHFile {
public static void main(String[] args) throws Exception {
String name = args[0];
RandomAccessFile raFile = new RandomAccessFile(name, "r");;
if (raFile.length() == 0) throw new IllegalArgumentException("empty file " + name);
View maps-details.patch
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 /
Created September 18, 2021 09:08 — forked from jtheuer/
Graphhopper offheap storage with URL loader.
import com.graphhopper.util.NotThreadSafe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xerial.larray.LByteArray;
import xerial.larray.japi.LArrayJ;
View Dockerfile
#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:

View area-condition.json
"priority": [{
"if": "road_class == MOTORWAY && in_near_cottbus == false",
"multiply_by": 0
"areas": {
"near_cottbus": {
"type": "Feature",
"properties": {},
"geometry": {