Hi, I’m connecting to graphhopper using the java client located here
implementation ‘com.graphhopper:directions-api-client-hc:5.3’
I’m trying to use polygon-based vehicle profiles as described here
I’ve built a CustomModel and I’m passing it in to request.setCustomModel, but I’m getting an error telling me I have to set the profile. Is there a special token that means “go use the custom model”? Or do I somehow associate a name with the model?
When I was routing client side, I could associate it by building a CustomProfile, but I don’t seem to have access to that class in the client library.
Yes, every custom model is based on some profile. Currently, you can use car,small_truck,scooter,foot or bike. For example if you use profile: car and setup a rule in your custom model that does multiply_by: 0.8 for speed, 80% of the normal car speed will be used for the affected roads.
This is your custom model. What does your request look like? And are you querying against graphhopper.com/api/1/route or do you run your own GraphHopper server?