View custom-routing.yml
speed: | |
- if: road_class == MOTORWAY | |
limit_to: 100 | |
priority: | |
- if: road_class == RESIDENTIAL | |
multiply_by: 0.5 |
View Lettuce.java
client.setOptions(ClientOptions.builder().sslOptions(SslOptions.builder() | |
.keystore(new File("user.p12"), "test12".toCharArray()) | |
.truststore(new File("keystore.jks"), "keystorepassword12") | |
.build()).build()); |
View schema.json
"schemas": { | |
"RouteRequest": { | |
"type": "object", | |
"properties": { | |
"custom_model": { | |
"description": "custom model bla", | |
"type": "object", | |
"properties": { | |
"speed": { | |
"type": "array", |
View RandomTest.java
class RandomTest { | |
@Test | |
public void randomGraph() { | |
long seed = 0;//System.nanoTime(); | |
Random rand = new Random(seed); | |
FlagEncoder encoder = new CarFlagEncoder(); | |
GraphHopperStorage graph = new GraphHopperStorage(new RAMDirectory(), EncodingManager.create(encoder), false).create(100); | |
GHUtility.buildRandomGraph(graph, rand, 1000, 3, true, true, |
View MyTest.java
class MyTest { | |
@Test | |
public void testX() throws CompileException { | |
IScriptEvaluator se = new ScriptEvaluator(); | |
MyInterface i = (MyInterface) se.createFastEvaluator("" | |
+ "System.out.println(\"Hello\");\n" | |
+ "String s = \"World\";\n" | |
+ "System.out.println(s);\n" | |
+ "return true;", | |
MyInterface.class, new String[0]); |
View MyBenchmark.java
/* | |
* Copyright (c) 2014, Oracle America, Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* |
View leaflet_hosted.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View customizable-routing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View config.yml
graphhopper: | |
datareader.file: "" | |
graph.location: graph-cache | |
graph.flag_encoders: car|turn_costs=true | |
profiles: | |
- name: car | |
vehicle: car | |
weighting: fastest |
View copy-to-bashrc.sh
# Here is how to append commits to a pull request from a foreign repository without (slow) cloning | |
# When you put the function in .bashrc you can use it via: | |
# cd graphhopper # go into your local copy of the repo where the pull request was made | |
# pranch graphhopper msbarry:sample-and-3d-simplify | |
# The first argument is your organisation and the second argument is "foreign_organisation:foreign_branch" e.g. copied from the pull request | |
pranch() | |
{ | |
forbranch=${2#*:} # == foreign branch | |
fororg=${2%%:*} # == foreign organisation | |
locbranch=${fororg}_${forbranch} |
NewerOlder