Re: [OSRM-talk] OSRM suggests alternative route a few times

2018-01-23 Thread Daniel Hofmann
There's an alternatives=n option you can use to request up to n
alternatives (if available).

Here are the constants for pruning alternative candidate paths:

https://github.com/Project-OSRM/osrm-backend/blob/02712cd513bca1b49d867085e80c608a53b7bb03/src/engine/routing_algorithms/alternative_path_mld.cpp#L37-L52

you can tune them to trade off between quality and quantity.

More insights here:

- https://github.com/Project-OSRM/osrm-backend/issues/3905
- https://github.com/Project-OSRM/osrm-backend/pull/4047

HTH,
Daniel J H

On Sun, Jan 21, 2018 at 4:27 PM, Behizz  wrote:

> Hello guys
>
> I'm using the latest OSRM version and I use the partition-customize chain
> for building the model and getting more alternatives. But OSRM suggests
> alternative routes a few times although there are so many good alternative
> routes based on weights.
>
> Is there any way to force it to return more alternatives?
>
> Thanks
>
> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Get route legs tags in response of route service

2018-01-23 Thread Michal Palenik
or add extra exclude classes to segments
https://github.com/Project-OSRM/osrm-backend/issues/4803


michal

On Mon, Jan 22, 2018 at 08:57:35AM -0800, Daniel Patterson wrote:
> Hi François,
> 
>   By default, no - OSRM doesn't save any data that it doesn't explicitly
> need.  There are two main approaches for getting extra OSM metadata along
> your route:
> 
>   1) Use something like https://github.com/mapbox/route-annotator to get
> the tag information *after* the route is found.
> 
>   2) Modify the `car.lua` script to encode the tags you want inside the
> `name` field.  Be aware that this can affect the generation of route steps,
> and not all steps may be returned due to obvious turn detection and step
> collapsing.
> 
> In general, (1) is probably the most robust approach, but you'll need a
> second server, and you'll have to write the code to do the extra lookup.
> 
> daniel
> 
> On Mon, Jan 22, 2018 at 8:29 AM, François Lacombe  > wrote:
> 
> > Hi everyone,
> >
> > i'm looking for the best strategy to get extra attributes of route legs
> > OSRM sends me in route service response.
> >
> > My goal is to know which type of path I should follow, e.g
> > highway=primary, highwy=secondary, man_made=pipeline or whatever.
> > Can I get in response every tags osm ways have in osm xml file processed
> > by osrm-extract ?
> >
> > Documentation gives examples with only name forwarded, but no extra tags.
> > Is this possible to get any id as to check against third party db?
> >
> > Thank you for any answer, all the best
> >
> > François
> >
> > ___
> > OSRM-talk mailing list
> > OSRM-talk@openstreetmap.org
> > https://lists.openstreetmap.org/listinfo/osrm-talk
> >
> >

> ___
> OSRM-talk mailing list
> OSRM-talk@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk


-- 
michal palenik
www.freemap.sk
www.oma.sk

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk