Hello guys,
I’ve been facing an issue with my graphhopper instance.
When I request a certain route, through graphhopper web, it gives me different options than my local graphhopper instance.
Graphhopper web:
Graphhopper Internal:
I’d like to know, why this is happening, and how can I troubleshoot it?
I have already checked the routing graph option, but I found no information that would help me in anyway.
Currently I’ve been using the latest planet osm release 240729, and I’ve been using the exactly same truck profile available in graphhopper repository on github.
We are using a slightly different profile. Read here more about it. Also it is unclear what configuration you are using.
Hey @karussell ,
I just read the topic you have mentioned. Just to be sure, when you say, slightly different profile, you mean, the configuration used in graphhopper web, has little differences from the truck profile available in graphhopper github repository, correct?
Now, about my current configuration, I have the following:
config.yml:
graphhopper:
datareader.file: ""
custom_models.directory: /graphhopper/profiles
profiles:
- name: car
vehicle: car
custom_model:
distance_influence: 70
- name: truck
vehicle: roads
weighting: custom
custom_model_files: [ truck.json ]
profiles_ch:
- profile: car
- profile: truck
profiles_lm: []
prepare.min_network_size: 1000
prepare.subnetworks.threads: 1
routing.non_ch.max_waypoint_distance: 100000000 #100.000.000
routing.max_visited_nodes: 10000000 #10.000.000
import.osm.ignored_highways: footway,cycleway,path,pedestrian,steps # typically useful for motorized-only routing
graph.location: graph-cache
graph.dataaccess.default_type: RAM_STORE
graph.encoded_values: hgv,max_weight,max_height,max_width,toll
graph.vehicles: roads|hgv=true
server:
application_connectors:
- type: http
port: 8989
bind_host: localhost
max_request_header_size: 50k
request_log:
appenders: []
admin_connectors:
- type: http
port: 8990
bind_host: localhost
logging:
appenders:
- type: file
time_zone: UTC
current_log_filename: 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: ./logs/graphhopper-%d.log.gz
archived_file_count: 30
never_block: true
- type: console
time_zone: UTC
log_format: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"
loggers:
"com.graphhopper.osm_warnings":
level: DEBUG
additive: false
appenders:
- type: file
currentLogFilename: logs/osm_warnings.log
archive: false
logFormat: '[%level] %msg%n'
truck.json:
{
"distance_influence": 1,
"priority": [
{ "if": "road_access == PRIVATE", "multiply_by": "0" },
{ "if": "car_access == false || hgv == NO || max_width < 3 || max_height < 4", "multiply_by": "0" }
],
"speed": [
{ "if": "true", "limit_to": "car_average_speed * 0.9" },
{ "if": "true", "limit_to": "95" }
]
}
Do you have any idea, how can I achieve the needed result in my route?
At least you’ll need to implement the urban_density feature: Add urban density encoded value to identify built-up areas by easbar · Pull Request #2637 · graphhopper/graphhopper · GitHub
and set different estimated speeds based on rural or city. Also we have turn restrictions enabled in the config and use the latest GraphHopper from master branch.