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

Daniel Patterson daniel at mapbox.com
Fri Aug 25 16:04:52 UTC 2017


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.infosreseaux at 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 <daniel at mapbox.com>:
>
>> 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.infosreseaux at gmail.com> wrote:
>>
>>>
>>> 2017-08-24 23:18 GMT+02:00 Daniel Patterson <daniel at mapbox.com>:
>>>
>>>> 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 at openstreetmap.org
>>> https://lists.openstreetmap.org/listinfo/osrm-talk
>>>
>>>
>>
>> _______________________________________________
>> OSRM-talk mailing list
>> OSRM-talk at openstreetmap.org
>> https://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/20170825/7c189a1f/attachment.html>


More information about the OSRM-talk mailing list