Re: [OSRM-talk] Use OSRM on rivers, railways, power lines

2017-08-28 Thread Daniel Patterson
Hi François,

  Currently, OSRM doesn't know anything about route relations (although
some work has started on it here:
https://github.com/Project-OSRM/osrm-backend/pull/4438).

  For now, you'd need to convert them to separate ways, or copy the
relation tags onto the relevant ways so that the `process_way` Lua function
will be able to see the tags.  Flattening relations like this can be
complicated, I don't know if there's an easy-to-use tool that can already
do it.

daniel

On Sun, Aug 27, 2017 at 10:59 PM, François Lacombe <
fl.infosrese...@gmail.com> wrote:

> Hi Daniel,
>
> This is indeed an interesting point.
>
> In substations, every incoming line is often connected to busbars, which
> allow to switch power from lines to another.
> They are supposed to be in OSM when outdoor and visible on aerial imagery
> like this one : http://www.openstreetmap.org/way/170169821
>
> Then I'd better to propagate substation attributes on its busbars and then
> define them as is_starting=true
> If I don't find them in OSM data, it's pretty easy to create a virtual one
> by linking every incoming line end point.
>
>
> Once the is_starting problem solved, can osrm understand directly route
> relation like the one given in my first mail :
> http://www.openstreetmap.org/relation/6694740
> Or should I convert them in separate ways before building osrm network ?
>
>
> All the best
>
> François
>
>
> *François Lacombe*
>
> fl dot infosreseaux At gmail dot com
> www.infos-reseaux.com
> @InfosReseaux 
>
> 2017-08-25 18:04 GMT+02:00 Daniel Patterson :
>
>> Hi François,
>>
>>   The only problem I can see is that OSRM only snaps to *edges*, not
>> nodes, and the `is_startpoint` property is only available for ways, not
>> nodes.
>>
>>   If you insert new artificial ways that connect the centroid to each
>> line and have different tags and can be marked as `is_startpoint=true`,
>> then it will work fine.  If you simply extend the powerlines by adding an
>> additional noderef to the powerline ways, then you'll still have the
>> nothing-to-snap-to problem.
>>
>> daniel
>>
>> On Thu, Aug 24, 2017 at 11:58 PM, François Lacombe <
>> fl.infosrese...@gmail.com> wrote:
>>
>>> Hi Daniel,
>>>
>>> Ok,
>>>
>>> Or I can take the centroid of each substation area and connect each line
>>> to it.
>>> Then, drop the area and only keep substations nodes which get the
>>> is_startpoint in the profile.
>>>
>>> On render side, I will surely be able to match substation nodes given by
>>> osrm and actual areas with ref tags.
>>>
>>> I'll be testing it for some times and will share it if interested
>>> Thank you for your time
>>>
>>>
>>> All the best
>>>
>>>
>>> 2017-08-25 0:04 GMT+02:00 Daniel Patterson :
>>>
 Yes, connectivity will be a problem in that example.  If you make the
 lines `is_startpoint=false` and they're not connected to something else,
 then you won't be able to route over them.

 You will need to do some pre-processing here - create artificial nodes
 at the points where the substation boundaries cross the lines and connect
 both ways to those artificial nodes.

 daniel

 On Thu, Aug 24, 2017 at 2:33 PM, François Lacombe <
 fl.infosrese...@gmail.com> wrote:

>
> 2017-08-24 23:18 GMT+02:00 Daniel Patterson :
>
>> Franccois,
>>
>>   In the lua profiles, you can set the `result.is_startpoint`
>> property in `process_way` (used to be `way_function`) to determine 
>> whether
>> you can snap to them.  We currently use this for ferry routes - paths can
>> use them, but can't start/end on them.
>>
>>   Set `is_startpoint` to true for your substations way areas, and
>> `is_startpoint` to false for the transmission lines.
>>
>
> That's exactly what I need, thank you
>
>
>>   The route will start by following the outside edge of the
>> substations area polygon, but it sounds like that doesn't matter too much
>> to you.
>>
>
> It doesn't matter indeed.
> But it may be an issue that power lines aren't actually connected to
> substation perimeter ?
>
> Like this one : https://www.openstreetmap.org/way/100500802
> The outside edge of the substation is the fence surrounding it and
> power lines goes above it without connection.
>
> Should I preprocess my data to make it more accessible to osrm or
> there's other way ?
>
> Francois
>
>
> ___
> 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] Use OSRM on rivers, railways, power lines

2017-08-28 Thread François Lacombe
Hi Daniel,

This is indeed an interesting point.

In substations, every incoming line is often connected to busbars, which
allow to switch power from lines to another.
They are supposed to be in OSM when outdoor and visible on aerial imagery
like this one : http://www.openstreetmap.org/way/170169821

Then I'd better to propagate substation attributes on its busbars and then
define them as is_starting=true
If I don't find them in OSM data, it's pretty easy to create a virtual one
by linking every incoming line end point.


Once the is_starting problem solved, can osrm understand directly route
relation like the one given in my first mail :
http://www.openstreetmap.org/relation/6694740
Or should I convert them in separate ways before building osrm network ?


All the best

François


*François Lacombe*

fl dot infosreseaux At gmail dot com
www.infos-reseaux.com
@InfosReseaux 

2017-08-25 18:04 GMT+02:00 Daniel Patterson :

> Hi François,
>
>   The only problem I can see is that OSRM only snaps to *edges*, not
> nodes, and the `is_startpoint` property is only available for ways, not
> nodes.
>
>   If you insert new artificial ways that connect the centroid to each line
> and have different tags and can be marked as `is_startpoint=true`, then it
> will work fine.  If you simply extend the powerlines by adding an
> additional noderef to the powerline ways, then you'll still have the
> nothing-to-snap-to problem.
>
> daniel
>
> On Thu, Aug 24, 2017 at 11:58 PM, François Lacombe <
> fl.infosrese...@gmail.com> wrote:
>
>> Hi Daniel,
>>
>> Ok,
>>
>> Or I can take the centroid of each substation area and connect each line
>> to it.
>> Then, drop the area and only keep substations nodes which get the
>> is_startpoint in the profile.
>>
>> On render side, I will surely be able to match substation nodes given by
>> osrm and actual areas with ref tags.
>>
>> I'll be testing it for some times and will share it if interested
>> Thank you for your time
>>
>>
>> All the best
>>
>>
>> 2017-08-25 0:04 GMT+02:00 Daniel Patterson :
>>
>>> Yes, connectivity will be a problem in that example.  If you make the
>>> lines `is_startpoint=false` and they're not connected to something else,
>>> then you won't be able to route over them.
>>>
>>> You will need to do some pre-processing here - create artificial nodes
>>> at the points where the substation boundaries cross the lines and connect
>>> both ways to those artificial nodes.
>>>
>>> daniel
>>>
>>> On Thu, Aug 24, 2017 at 2:33 PM, François Lacombe <
>>> fl.infosrese...@gmail.com> wrote:
>>>

 2017-08-24 23:18 GMT+02:00 Daniel Patterson :

> Franccois,
>
>   In the lua profiles, you can set the `result.is_startpoint` property
> in `process_way` (used to be `way_function`) to determine whether you can
> snap to them.  We currently use this for ferry routes - paths can use 
> them,
> but can't start/end on them.
>
>   Set `is_startpoint` to true for your substations way areas, and
> `is_startpoint` to false for the transmission lines.
>

 That's exactly what I need, thank you


>   The route will start by following the outside edge of the
> substations area polygon, but it sounds like that doesn't matter too much
> to you.
>

 It doesn't matter indeed.
 But it may be an issue that power lines aren't actually connected to
 substation perimeter ?

 Like this one : https://www.openstreetmap.org/way/100500802
 The outside edge of the substation is the fence surrounding it and
 power lines goes above it without connection.

 Should I preprocess my data to make it more accessible to osrm or
 there's other way ?

 Francois


 ___
 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
>>
>>
>
> ___
> 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] Use OSRM on rivers, railways, power lines

2017-08-24 Thread François Lacombe
2017-08-24 23:18 GMT+02:00 Daniel Patterson :

> Franccois,
>
>   In the lua profiles, you can set the `result.is_startpoint` property in
> `process_way` (used to be `way_function`) to determine whether you can snap
> to them.  We currently use this for ferry routes - paths can use them, but
> can't start/end on them.
>
>   Set `is_startpoint` to true for your substations way areas, and
> `is_startpoint` to false for the transmission lines.
>

That's exactly what I need, thank you


>   The route will start by following the outside edge of the substations
> area polygon, but it sounds like that doesn't matter too much to you.
>

It doesn't matter indeed.
But it may be an issue that power lines aren't actually connected to
substation perimeter ?

Like this one : https://www.openstreetmap.org/way/100500802
The outside edge of the substation is the fence surrounding it and power
lines goes above it without connection.

Should I preprocess my data to make it more accessible to osrm or there's
other way ?

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


Re: [OSRM-talk] Use OSRM on rivers, railways, power lines

2017-08-24 Thread Daniel Patterson
Franccois,

  In the lua profiles, you can set the `result.is_startpoint` property in
`process_way` (used to be `way_function`) to determine whether you can snap
to them.  We currently use this for ferry routes - paths can use them, but
can't start/end on them.

  Set `is_startpoint` to true for your substations way areas, and
`is_startpoint` to false for the transmission lines.

  The route will start by following the outside edge of the substations
area polygon, but it sounds like that doesn't matter too much to you.

daniel


On Thu, Aug 24, 2017 at 1:40 PM, François Lacombe  wrote:

> Hi Daniel, Ricardo,
>
> Thank you for your answers.
>
> I completely agree on necessity of perfect connectivity between features.
> It has been a concern for me regarding power networks for years of
> contribution now.
>
> The challenge is currently to adapt car profile to power lines
> Voltage may act as the maxspeed key, and transformers as toll
>
> As you may see in the relation example I gave, there is two substations at
> the ends of line members.
> Differently from roads or rivers, you can't connect to power lines or
> pipelines anywhere. Start and end into substations is mandatory
> (power=substation or pipeline=substation, they are both areas)
> How can I told osrm to look for the nearest substation before starting
> routing in the graph exclusively composed of power lines or pipelines ?
>
> Guidance information isn't so relevant in such networks, then I will only
> focus on osrm path answer
>
> François
>
> *François Lacombe*
>
> fl dot infosreseaux At gmail dot com
> www.infos-reseaux.com
> @InfosReseaux 
>
> 2017-08-24 18:52 GMT+02:00 Ricardo Pereira :
>
>> We use OSRM to route within water only (Oceans and Rivers). It makes
>> absolute no difference what you are routing through as long as you can
>> provide a mesh with your topology.
>> Our Lua script therefore matches the tags that we create for own data,
>> nothing to do with OSM.
>>
>> Cheers
>>
>> On Thu, 24 Aug 2017 at 16:15 François Lacombe 
>> wrote:
>>
>>> Hi all,
>>>
>>> Since there is not only roads but many other topological networks mapped
>>> on OSM, I'm wondering how osrm may be usable on them.
>>>
>>> Example : a power route used to establish a link between two substations
>>> http://www.openstreetmap.org/relation/6694740
>>>
>>> I know pretty well how lua profiles are built, for cars, bike,
>>> pedestrian... but is there any profile available for power or gas pipelines?
>>> Let's say we have proper data, is the profile the only thing to change
>>> to use osrm on pipelines or rivers exclusively ?
>>>
>>> Many thanks for any answer regarding this question
>>>
>>>
>>> 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
>>
>>
>
> ___
> 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] Use OSRM on rivers, railways, power lines

2017-08-24 Thread François Lacombe
Hi Daniel, Ricardo,

Thank you for your answers.

I completely agree on necessity of perfect connectivity between features.
It has been a concern for me regarding power networks for years of
contribution now.

The challenge is currently to adapt car profile to power lines
Voltage may act as the maxspeed key, and transformers as toll

As you may see in the relation example I gave, there is two substations at
the ends of line members.
Differently from roads or rivers, you can't connect to power lines or
pipelines anywhere. Start and end into substations is mandatory
(power=substation or pipeline=substation, they are both areas)
How can I told osrm to look for the nearest substation before starting
routing in the graph exclusively composed of power lines or pipelines ?

Guidance information isn't so relevant in such networks, then I will only
focus on osrm path answer

François

*François Lacombe*

fl dot infosreseaux At gmail dot com
www.infos-reseaux.com
@InfosReseaux 

2017-08-24 18:52 GMT+02:00 Ricardo Pereira :

> We use OSRM to route within water only (Oceans and Rivers). It makes
> absolute no difference what you are routing through as long as you can
> provide a mesh with your topology.
> Our Lua script therefore matches the tags that we create for own data,
> nothing to do with OSM.
>
> Cheers
>
> On Thu, 24 Aug 2017 at 16:15 François Lacombe 
> wrote:
>
>> Hi all,
>>
>> Since there is not only roads but many other topological networks mapped
>> on OSM, I'm wondering how osrm may be usable on them.
>>
>> Example : a power route used to establish a link between two substations
>> http://www.openstreetmap.org/relation/6694740
>>
>> I know pretty well how lua profiles are built, for cars, bike,
>> pedestrian... but is there any profile available for power or gas pipelines?
>> Let's say we have proper data, is the profile the only thing to change to
>> use osrm on pipelines or rivers exclusively ?
>>
>> Many thanks for any answer regarding this question
>>
>>
>> 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
>
>
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Use OSRM on rivers, railways, power lines

2017-08-24 Thread Daniel Patterson
Hi Francois,

  In theory, yes, you could route on powerlines, gas lines, or any other
linear feature.  Ensuring connectivity could be problematic - often rivers
are not connected to paths in OSM.

  Waterways are a bit problematic as they're often modeled as areas - if
you modify the Lua script to include them in the routing graph, OSRM will
route around the edges of the polygon.

  Getting proper connectivity between all the elements you want to route
between can be problematic as well - very often, rivers/rail are not
connected to roads or paths inside OSM.

  The turn-by-turn instructions might also be a bit weird if you don't
route on roads/paths - the guidance code has been mostly focused on
sensible instructions for drivers.

daniel

On Thu, Aug 24, 2017 at 6:27 AM, François Lacombe  wrote:

> Hi all,
>
> Since there is not only roads but many other topological networks mapped
> on OSM, I'm wondering how osrm may be usable on them.
>
> Example : a power route used to establish a link between two substations
> http://www.openstreetmap.org/relation/6694740
>
> I know pretty well how lua profiles are built, for cars, bike,
> pedestrian... but is there any profile available for power or gas pipelines?
> Let's say we have proper data, is the profile the only thing to change to
> use osrm on pipelines or rivers exclusively ?
>
> Many thanks for any answer regarding this question
>
>
> 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