I have created a GraphHopper server on Windows. Directions API seems to be working, but I want to avoid motorways. In order to do so I have added “ch.disable=true” and “avoid=motorway” to the request, but the server returns:
“{“message”:“Disabling CH not allowed on the server-side”,“hints”:[{“message”:“Disabling CH not allowed on the server-side”,“details”:“java.lang.IllegalArgumentException”}]}”.
Does that mean we can’t have directions with avoid parameter?
Many thanks - I’ll give a try during next days, as I’m getting an error while trying running flex_veichleprofile branch
## using java 1.8.0_102 (64bit) from
## using existing osm file taa.pbf
## existing jar found web/target/graphhopper-web-0.12-SNAPSHOT.jar
## now web. JAVA_OPTS=-Xmx1000m -Xms1000m
io.dropwizard.configuration.ConfigurationParsingException: config.yml has an error:
* Unrecognized field at: server.applicationConnectors
Did you mean?:
- application_connectors
- application_context_path
- admin_connectors
- admin_min_threads
- allowed_methods
[22 more]
at io.dropwizard.configuration.ConfigurationParsingException$Builder.build(ConfigurationParsingException.java:279)
at io.dropwizard.configuration.BaseConfigurationFactory.build(BaseConfigurationFactory.java:140)
[...]
Ah, yes. Thanks for the feedback on this fresh work. The problem is that I wanted to avoid to annotate every Java property which is in “camelCase” with its “under_score” JSON notation and so I used this configuration for jackson:
If this branch is too experimental for your case, then this pull request could be interesting, but this requires probably a bit more Java and GH knowledge.
Options &ch.disable=true&avoid=toll do not seem to work our of the box, you wrote:
If I got it correctly, in order to implement toll avoidance, I need to define a new vehicle (fire_truck is an example) with proper wording in the “no_access” section - correct?
The request format is different as we plan to make things more customizable URL parameters are not the best choice. You’ll need to POST a JSON. See the tests.
If I got it correctly, in order to implement toll avoidance, I need to define a new vehicle (fire_truck is an example) with proper wording in the “no_access” section - correct?
You can define a new vehicle in the config:
graph.encoding_manager: some_vehicle.yml
but it should also work to do a POST request against the new “/flex” endpoint, even if you only have car defined. To make it working use the JSON similar to the one in the test. (Currently this is inconsistent: import requires yml file, request requires JSON, in the future both will be supported for both scenarios)
Ah, I believe I got it, I focused on the fire_truck example which makes a get request http://localhost:8080/route?...vehicle=fire_truck&weighting=flex while I see now I need to target /flex endpoint with a POST request as per the wheelchair examples.
Hi there !
I’m using the open source routing engine and its web API, if i understand well this discussion (and its follow up ) the “avoid” parameter is not available in the API, right ? Will it be available in the future ?
I’m VERY interested in avoiding motorway and toll !
The avoid parameter is not yet in the master branch. We tried to introduce it here but we decided that this needs a separate issue. Maybe we’ll wait until the flexible branch is integrated, maybe it comes earlier we do not know yet. But it will be there