VROOM-Project / vroom-express

Out of the box Node-express server to use VROOM as a web API.
BSD 2-Clause "Simplified" License
70 stars 60 forks source link

Output in geojson #81

Closed mickael-bdias closed 3 years ago

mickael-bdias commented 3 years ago

Hey! Is it possible to add a new feature regarding the way the output is displayed?

For example, the OSRM have several options regarding the way the geometries are displayed - polyline (default), polyline6, geojson.

It is possible to display the output in geojson instead of a polyline?

jcoupey commented 3 years ago

Doing this at the vroom-express level would require to add a post-treatment to the output of the vroom system call, using a simple decoding utility, such as this one. This is totally doable, however I'm not sure if this is really relevant, given that:

mickael-bdias commented 3 years ago

Sorry for the late reply, I was on vacations. That's was useful.

Can you tell me if it's possible to block some coordinates? For instance, I may want to block some street for several reasons.

Thanks!

nilsnolde commented 3 years ago

that'd need to happen on the routing engine level, you can't avoid roads dynamically purely controlled by vroom. in OSRM's case there's a few things you could try that I'm aware of, but they all need to be done at graph-building time (i.e. cannot be dynamically changed at query time):

However, ORS and Valhalla do have the option to avoid roads dynamically, but then you'd need to calculate the matrices/routes beforehand and pass them as custom matrix to vroom, since vroom can't (yet) take into account custom matrix/routing options and forward them to the routing engine. I'm actually waiting for someone to sponsor that functionality, that would make vroom more user-friendly especially with the high flexibility of Valhalla.

mickael-bdias commented 3 years ago

Thanks.

Actually, I am planning to use the Nearest service (OSRM) to get new coordinates. And see, if I have any luck with that solution. My idea is to 'force' to go to another route.

Or maybe using the alternatives option of Route Service.

I think the problem with Valhalla is you can't make personalized profiles (Lua), but I can be wrong.

nilsnolde commented 3 years ago

I think the problem with Valhalla is you can't make personalized profiles (Lua), but I can be wrong.

You CAN do some processing with your own Lua file, also profile specific. Valhalla doesn't need that for the most part though since there's TONS of parameters you can change per request (unlike OSRM and mostly ORS/Graphhopper). The main problem with Valhalla is the performance on the matrix service, it's slow compared to the others. But that's the price for the crazy flexibility that comes with Valhalla. I recommend this article I wrote a while ago, might give some further insights: https://gis-ops.com/open-source-routing-engines-and-algorithms-an-overview/