Hello, I’m connecting to GH3 by ‘/route’ link from another app, which makes it by multiple threads.
Im using tools from that dependencies:
’
com.graphhopper
directions-api-client-hc
3.2
com.graphhopper
graphhopper-core
3.2
’
The body of the post request in GraphHopperWeb class (method ‘route’) is:
{“points”:[[21.72831,54.09701],[21.08461,52.30333]],“locale”:“en_US”,“profile”:“car”,“points_encoded”:true,“instructions”:false,“calc_points”:false,“elevation”:false,“optimize”:“false”}
In the GH in ProfileResolver i ‘selectProfileCH’ method there are many profiles matching but I only want the ‘car’ profile.
I’ve got this exception:
INFO [2022-11-07 11:54:26,448] com.graphhopper.http.IllegalArgumentExceptionMapper: bad request: There are multiple CH profiles matching your request. Use the
weighting
,vehicle
,turn_costs
and/oru_turn_costs
parameters to be more specific.
You can also try disabling CH altogether using ch.disable=true
requested: ||turn_costs=|u_turn_costs=
matched: [custom|car|turn_costs=false, custom|car|turn_costs=false, custom|car|turn_costs=false, custom|truck|turn_costs=false]
available: [custom|car|turn_costs=false, custom|car|turn_costs=false, custom|car|turn_costs=false, custom|truck|turn_costs=false]
You should consider using theprofile
parameter. The available profiles are: [car, no_motorway_car, no_toll_motorway_car, truck]
To learn more about profiles, see: docs/core/profiles.md "
And next logs are like:
"INFO [2022-11-07 11:54:27,811] com.graphhopper.resources.RouteResource: 127.0.0.1 pl_PL okhttp/3.10.0 2, took: 696,0 ms, algo: , profile: car, weighting: , vehicle: , custom_model: null, alternatives: 1, distance0: 724298.153131912, weight0: 30995.728941336427, time0: 517min, points0: 0, debugInfo: idLookup:0.0772805s; , algoInit:22911 μs, dijkstrabi|ch-routing:310 ms, path extraction: 78831 μsvisited nodes sum: 517
"
Has anyone some clue why it is like this?
edit: I realized that my POST request from GraphHopperWeb.class takes the GET method in GH RouteResource.class. The problem is still current.