oh I’m sorry, you’re right. I’m still in the Monday mood
.
Here is my config:
graphhopper:
datareader.file: netherlands-latest.osm.pbf # OSM input file
graph.location: graph-gh
profiles:
- name: motorcycle
vehicle: motorcycle
weighting: custom
custom_model_file: empty
- name: bike
vehicle: bike
weighting: custom
custom_model_file: empty
- name: foot
vehicle: foot
weighting: custom
custom_model_file: empty
profiles_lm:
- profile: motorcycle
- profile: bike
- profile: foot
prepare.lm.threads: 1
graph.flag_encoders: foot,bike,motorcycle|turn_costs=true
graph.encoded_values: toll, surface
graph.elevation.provider: srtm
routing.max_visited_nodes: 11000000
# PRODUCTION
graph.elevation.cache_dir: /data/srtm/
graph.dataaccess: RAM_STORE
server:
application_connectors:
- type: http
port: 8989
# DEVELOPMENT
# bind_host: localhost
admin_connectors:
- type: http
port: 8990
# DEVELOPMENT
# bind_host: localhost
# PRODUCTION
logging:
appenders:
- type: file
time_zone: UTC+1
current_log_filename: /data/logs/graphhopper.log
log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
archive: true
archived_log_filename_pattern: /data/logs/graphhopper-%d.log.gz
archived_file_count: 7
never_block: true
- type: console
time_zone: UTC+1
log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
POST Request with curvature:
{
"custom_model": {
"priority": [
{
"if": "motorcycle$curvature > 0.5",
"multiply_by": 0.9
},
{
"if": "road_class == MOTORWAY",
"multiply_by": 0.1
}
]
},
"profile": "motorcycle",
"points": [
[
"7.185059",
"52.676382"
],
[
"7.467957",
"52.108192"
]
],
"ch_disable": true,
"points_encoded": false,
"elevation": true
}
response:
{
"hints": {
"visited_nodes.sum": 74426,
"visited_nodes.average": 74426.0
},
"info": {
"copyrights": [
"GraphHopper",
"OpenStreetMap contributors"
],
"took": 84
},
"paths": [
{
"distance": 83046.158,
"weight": 10634.967878,
"time": 4339564,
"transfers": 0,
"points_encoded": false,
"bbox": [
7.083785,
52.107704,
7.467016,
52.676411
],
"points": { ...
Request without curvature:
{
"custom_model": {
"priority": [
{
"if": "road_class == MOTORWAY",
"multiply_by": 0.1
}
]
},
"profile": "motorcycle",
"points": [
[
"7.185059",
"52.676382"
],
[
"7.467957",
"52.108192"
]
],
"ch_disable": true,
"points_encoded": false,
"elevation": true
}
response:
{
"hints": {
"visited_nodes.sum": 71048,
"visited_nodes.average": 71048.0
},
"info": {
"copyrights": [
"GraphHopper",
"OpenStreetMap contributors"
],
"took": 82
},
"paths": [
{
"distance": 83046.158,
"weight": 10152.794193,
"time": 4339564,
"transfers": 0,
"points_encoded": false,
"bbox": [
7.083785,
52.107704,
7.467016,
52.676411
],
"points": { ....
As you can see the weight and the visited nodes change, but the distance and duration remain the same. Visually I hardly see anything change.
Do you have any idea what I’m doing wrong and how I can improve it?