[OSRM-talk] Small way neglected

Roland Swingler roland at beeline.co
Fri Dec 17 09:25:38 UTC 2021


Not 100% sure what you're trying to do, but I've had a similar problem in
that I have wanted to get the route extracted from OSRM with no compression
at all - i.e. I don't want guidance instructions, I want every single
node/way as it appears in OSM data). To do this, I had to hack
https://github.com/Project-OSRM/osrm-backend/blob/master/include/engine/api/route_api.hpp#L957-L960,
removing (or making conditional) the first and last lines of this block
collapseTurnInstructions and suppressShortNameSegmenets (If you follow
through the code and read what those functions are doing, you'll see that
they're removing things that are shorter than a certain length and
otherwise trying to make the turn instructions sensible for human
consumption).

HTH
Roland

On Thu, 16 Dec 2021 at 20:01, yvecai via OSRM-talk <
osrm-talk at openstreetmap.org> wrote:

> So, whatever small rate I set for piste:difficulty=intermediate, no way to
> get this 92 m way in the 'toute' output (apart if the route starts or stops
> on it).
>
> My guess is an optimization happens somewhere for very small ways, but I
> can't find it.
>
> Yves
>
> On 15.12.21 10:55, yvecai via OSRM-talk wrote:
>
>
> Actually, as I get way informations from another database, I've already
> set the way osm IDs as name (local name = way:id() in function
> WayHandlers.names), so that should already do the trick, but apparently not.
> I've also tried to set weight_precision = 0.1 to avoid rounding to 0, but
> no result.
>
> Regards,
> Yves
> On 14.12.21 21:37, Daniel Patterson wrote:
>
> OSRM isn't designed to provide perfect information along the route like
> that - but it can be hacked to get close.  When I built out the elevation
> profile feature for skitrails.com, I used a combination of a DEM in
> postgis along with the OSRM route geometry to make the elevation profile,
> so not directly in OSRM itself.
>
> For highlighting tagged difficulty sections, what you could try us using
> `piste:difficulty` as part of the `name` attribute in OSRM - it _should_
> emit a new step for each new name along the path, so if difficulty changes,
> you'd get a new step at that point.
>
> You would need to remove the appended `piste:difficulty` tag from any name
> you wanted to display on screen later on though.
>
> daniel
>
> On Tue, Dec 14, 2021 at 10:40 AM Yves <ycai at mailbox.org> wrote:
>
>> Yes, exactly, I'm playing with OSRM to eventually replace the routing
>> backend at opensnowmap.org
>> This feature provides the user a topo highlighting the various
>> difficulties along the route.
>> Yves - Opensnowmap
>>
>> Le 14 décembre 2021 19:13:55 GMT+01:00, Daniel Patterson <
>> daniel at mapbox.com> a écrit :
>>>
>>> Yves,
>>>
>>>   I would say that OSRM's step-by-step instructions are definitely not
>>> optimized for nordic ski trails.  The route _geometry_ will be correct, but
>>> the steps are primarily designed to look at road class (highway=) and names
>>> - none of the piste: tags are considered when generating steps.
>>>
>>>   What does the optimal output look like in your opinion?  As a
>>> long-time nordic ski racer myself, if I even bothered to use navigation,
>>> I'd mostly only be interested in locations where there were intersections.
>>> Are you looking to analyze the various difficulty ratings along the
>>> selected route?
>>>
>>> daniel
>>>
>>> On Tue, Dec 14, 2021 at 10:04 AM Yves via OSRM-talk <
>>> osrm-talk at openstreetmap.org> wrote:
>>>
>>>> Hello,
>>>> Playing around with OSRM, I figured that smaller ways seems to be
>>>> coalesced with others to form a single 'step' in the output.
>>>> I can't find any parameter in the Lua config to change this behaviour
>>>> (yet).
>>>> Any hint is appreciated.
>>>> The use case is a short nordic skiing way with a different
>>>> piste:difficulty along a much longer route.
>>>> www.openstreetmap.org/way/103175249
>>>> Regards,
>>>> Yves
>>>> _______________________________________________
>>>> OSRM-talk mailing list
>>>> OSRM-talk at openstreetmap.org
>>>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>>>
>>>
>
> _______________________________________________
> OSRM-talk mailing listOSRM-talk at openstreetmap.orghttps://lists.openstreetmap.org/listinfo/osrm-talk
>
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20211217/2778f4fe/attachment-0001.htm>


More information about the OSRM-talk mailing list