Re: [OSRM-talk] Per-Direction Node Restrictions

2016-10-06 Thread Spencer Gardner
Come to think of it, it would probably be simpler to just make each node
aware of the "highest" order of highway. Knowing that, it would work to
read that info for each constituent way and determine priority based on if
the way's order matches the node's order..

On Thu, Oct 6, 2016 at 1:29 AM, Daniel Hofmann  wrote:

> This is not planned at the moment, since all the profiles know about are
> tags. All additional processing has to happen internally in the C++ code,
>  and that's exactly why priority roads / give ways / stop signs are a bit
> ugly to implement. Sorry.
>
> On Thu, Oct 6, 2016 at 12:19 AM, Spencer Gardner  > wrote:
>
>> I started working on this in https://github.com/Project-OSR
>>> M/osrm-backend/pull/3009 but it won't be a quick change in the
>>> profiles, for sure.
>>>
>>> Cheers,
>>> Daniel J H
>>>
>>>
>> Thanks. Will your changes also allow me to read the tags of other roads
>> approaching the same node? That's the important piece for my purposes. A
>> priority_road tag is likely to be unreliable in the US since it has no
>> legal status, so I need to make some assumptions about priority based on
>> the various highway tags of the incoming ways.
>>
>> ___
>> 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
>
>
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Per-Direction Node Restrictions

2016-10-06 Thread Daniel Hofmann
This is not planned at the moment, since all the profiles know about are
tags. All additional processing has to happen internally in the C++ code,
 and that's exactly why priority roads / give ways / stop signs are a bit
ugly to implement. Sorry.

On Thu, Oct 6, 2016 at 12:19 AM, Spencer Gardner 
wrote:

> I started working on this in https://github.com/Project-OSR
>> M/osrm-backend/pull/3009 but it won't be a quick change in the profiles,
>> for sure.
>>
>> Cheers,
>> Daniel J H
>>
>>
> Thanks. Will your changes also allow me to read the tags of other roads
> approaching the same node? That's the important piece for my purposes. A
> priority_road tag is likely to be unreliable in the US since it has no
> legal status, so I need to make some assumptions about priority based on
> the various highway tags of the incoming ways.
>
> ___
> 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] Per-Direction Node Restrictions

2016-10-05 Thread Spencer Gardner
>
> I started working on this in https://github.com/Project-
> OSRM/osrm-backend/pull/3009 but it won't be a quick change in the
> profiles, for sure.
>
> Cheers,
> Daniel J H
>
>
Thanks. Will your changes also allow me to read the tags of other roads
approaching the same node? That's the important piece for my purposes. A
priority_road tag is likely to be unreliable in the US since it has no
legal status, so I need to make some assumptions about priority based on
the various highway tags of the incoming ways.
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Per-Direction Node Restrictions

2016-10-05 Thread Daniel Hofmann
I just remembered your issue while looking at road priorities: priority
roads, give way, stop signs:

- https://github.com/Project-OSRM/osrm-backend/issues/3003
- https://github.com/Project-OSRM/osrm-backend/issues/2652

>From reading your profile pseudo code it should roughly be the same!

I started working on this in
https://github.com/Project-OSRM/osrm-backend/pull/3009 but it won't be a
quick change in the profiles, for sure.

Cheers,
Daniel J H

On Tue, Sep 27, 2016 at 4:29 PM, Spencer Gardner 
wrote:

> On Tue, Sep 27, 2016 at 5:11 AM, Daniel Hofmann 
> wrote:
>
>> When you say "should be avoided" you mean completely discarding a way
>> going over a specific node in a single direction?
>> In that case, we support turn restrictions in the form of
>> `fromWay,viaNode,toWay` you could try.
>>
>> As in: `no_turn, fromResidential, viaHighwayNode, toResidential`
>>
>> (Relevant: via-way restrictions: https://github.com/Project-OSR
>> M/osrm-backend/issues/2681)
>>
>> Cheers,
>> Daniel J H
>>
>>
> I had considered turn restrictions, but I was hoping for something a
> little more generalizable so that I don't have to identify specific nodes
> and ways in the config. For example, I'd like to tell the router to avoid a
> node representing the intersection of a residential way and a primary way
> IF the route is using the residential way. But I'd like to avoid having to
> identify all such instances via turn restrictions.
>
> I could imagine something like the following pseudo code:
>
> function crossing_penalty(entering_way, crossing_way, node)
> local entering_highway = way:get_value_by_key("highway")
> local crossing_highway = way:get_value_by_key("highway")
> -- get traffic signals
> local tag = node:get_value_by_key("highway")
> if tag and "traffic_signals" == tag then
> traffic_lights = true
> end
>
> if entering_highway == "residential" and crossing_highway == "primary"
> and not traffic_lights then:
> crossing_penalty = some_large_number
>
> ___
> 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] Per-Direction Node Restrictions

2016-09-27 Thread Spencer Gardner
On Tue, Sep 27, 2016 at 5:11 AM, Daniel Hofmann  wrote:

> When you say "should be avoided" you mean completely discarding a way
> going over a specific node in a single direction?
> In that case, we support turn restrictions in the form of
> `fromWay,viaNode,toWay` you could try.
>
> As in: `no_turn, fromResidential, viaHighwayNode, toResidential`
>
> (Relevant: via-way restrictions: https://github.com/Project-
> OSRM/osrm-backend/issues/2681)
>
> Cheers,
> Daniel J H
>
>
I had considered turn restrictions, but I was hoping for something a little
more generalizable so that I don't have to identify specific nodes and ways
in the config. For example, I'd like to tell the router to avoid a node
representing the intersection of a residential way and a primary way IF the
route is using the residential way. But I'd like to avoid having to
identify all such instances via turn restrictions.

I could imagine something like the following pseudo code:

function crossing_penalty(entering_way, crossing_way, node)
local entering_highway = way:get_value_by_key("highway")
local crossing_highway = way:get_value_by_key("highway")
-- get traffic signals
local tag = node:get_value_by_key("highway")
if tag and "traffic_signals" == tag then
traffic_lights = true
end

if entering_highway == "residential" and crossing_highway == "primary"
and not traffic_lights then:
crossing_penalty = some_large_number
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Per-Direction Node Restrictions

2016-09-27 Thread Daniel Hofmann
When you say "should be avoided" you mean completely discarding a way going
over a specific node in a single direction?
In that case, we support turn restrictions in the form of
`fromWay,viaNode,toWay` you could try.

As in: `no_turn, fromResidential, viaHighwayNode, toResidential`

(Relevant: via-way restrictions:
https://github.com/Project-OSRM/osrm-backend/issues/2681)

Cheers,
Daniel J H

On Sat, Sep 24, 2016 at 6:16 PM, Spencer Gardner 
wrote:

> Is there currently a way to treat a node differently based on the way that
> is used to access it? I think what I'm after is something similar to the
> discussion here:
> https://github.com/Project-OSRM/osrm-backend/issues/2652
>
> My issue is specific to bicycle routing, though. There are instances where
> a node should be avoided on a residential highway because it crosses a high
> speed or heavily traveled primary highway. However, the same node is an
> acceptable crossing for a cyclist traveling along the primary highway since
> they have the right of way.
>
> Is this possible currently? It doesn't seem like the existing bicycle
> profile accounts for it.
>
> ___
> 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


[OSRM-talk] Per-Direction Node Restrictions

2016-09-24 Thread Spencer Gardner
Is there currently a way to treat a node differently based on the way that
is used to access it? I think what I'm after is something similar to the
discussion here:
https://github.com/Project-OSRM/osrm-backend/issues/2652

My issue is specific to bicycle routing, though. There are instances where
a node should be avoided on a residential highway because it crosses a high
speed or heavily traveled primary highway. However, the same node is an
acceptable crossing for a cyclist traveling along the primary highway since
they have the right of way.

Is this possible currently? It doesn't seem like the existing bicycle
profile accounts for it.
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk