I am using Graphhopper 0.9.0 as the back engine for a routing REST API. In order to reduce the size of the Json response, I would like to optionally disable the points calculation so I just return the travel time and distance.
I have seen a request parameter on the Directions API that does this : calc_points. However, I don’t find any option on the java GHRequest in order to disable the points calculation.
Of course, I can just ignore the point list of the calculated path when sending my Json response, but I was wondering if the points calculation could be totally disabled on a per request basis, and thus maybe accelerate a little bit the routing calculation.
In order to avoid potential multi-threading concurrency problems, I decided to use the request hints, instead of setting the default value on the hopper (myHopper.setEnableCalcPoints(false)) every time before calling the route method.
Also, in order to get an empty pointList in the response PathWrapper, I had to disable the ìnstructions as well.