<div dir="ltr">Hi François,<br><div><br></div><div> Currently, OSRM doesn't know anything about route relations (although some work has started on it here: <a href="https://github.com/Project-OSRM/osrm-backend/pull/4438">https://github.com/Project-OSRM/osrm-backend/pull/4438</a>).</div><div><br></div><div> 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.</div><div><br></div><div>daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 27, 2017 at 10:59 PM, François Lacombe <span dir="ltr"><<a href="mailto:fl.infosreseaux@gmail.com" target="_blank">fl.infosreseaux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Hi Daniel,<br><br></div>This is indeed an interesting point.<br><br></div>In substations, every incoming line is often connected to busbars, which allow to switch power from lines to another.<br></div>They are supposed to be in OSM when outdoor and visible on aerial imagery like this one : <a href="http://www.openstreetmap.org/way/170169821" target="_blank">http://www.openstreetmap.org/<wbr>way/170169821</a><br><br></div>Then I'd better to propagate substation attributes on its busbars and then define them as is_starting=true<br></div>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.<br><br><br></div>Once the is_starting problem solved, can osrm understand directly route relation like the one given in my first mail :<br><a href="http://www.openstreetmap.org/relation/6694740" target="_blank">http://www.openstreetmap.org/r<wbr>elation/6694740</a><br></div>Or should I convert them in separate ways before building osrm network ?<br><br><br></div><div>All the best<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>François<br></div><div><div><br></div></div></font></span></div><div class="gmail_extra"><span class=""><br clear="all"><div><div class="m_-1048064762695035683gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>François Lacombe</b><br><br>fl dot infosreseaux At gmail dot com<br><a href="http://www.infos-reseaux.com" target="_blank">www.infos-reseaux.com</a><br><a href="http://www.twitter.com/InfosReseaux" target="_blank">@InfosReseaux</a></div></div></div>
<br></span><div><div class="h5"><div class="gmail_quote">2017-08-25 18:04 GMT+02:00 Daniel Patterson <span dir="ltr"><<a href="mailto:daniel@mapbox.com" target="_blank">daniel@mapbox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi François,<br><div><br></div><div> The only problem I can see is that OSRM only snaps to <b>edges</b>, not nodes, and the `is_startpoint` property is only available for ways, not nodes.</div><div><br></div><div> 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.</div><span class="m_-1048064762695035683HOEnZb"><font color="#888888"><div><br></div><div>daniel</div></font></span></div><div class="m_-1048064762695035683HOEnZb"><div class="m_-1048064762695035683h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 24, 2017 at 11:58 PM, François Lacombe <span dir="ltr"><<a href="mailto:fl.infosreseaux@gmail.com" target="_blank">fl.infosreseaux@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi Daniel,<br><br></div>Ok,<br><br></div>Or I can take the centroid of each substation area and connect each line to it.<br></div>Then, drop the area and only keep substations nodes which get the is_startpoint in the profile.<br><br></div>On render side, I will surely be able to match substation nodes given by osrm and actual areas with ref tags.<br><br></div>I'll be testing it for some times and will share it if interested<br></div><div>Thank you for your time<br></div><div><br><br></div>All the best<div><div class="m_-1048064762695035683m_-8157068335884588591h5"><br><div><div><div><div><div><div><div><br><div class="gmail_extra"><div class="gmail_quote">2017-08-25 0:04 GMT+02:00 Daniel Patterson <span dir="ltr"><<a href="mailto:daniel@mapbox.com" target="_blank">daniel@mapbox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<div><br></div><div>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.</div><span class="m_-1048064762695035683m_-8157068335884588591m_-7382593890491713389HOEnZb"><font color="#888888"><div><br></div><div>daniel</div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1048064762695035683m_-8157068335884588591m_-7382593890491713389h5">On Thu, Aug 24, 2017 at 2:33 PM, François Lacombe <span dir="ltr"><<a href="mailto:fl.infosreseaux@gmail.com" target="_blank">fl.infosreseaux@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1048064762695035683m_-8157068335884588591m_-7382593890491713389h5"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><span>2017-08-24 23:18 GMT+02:00 Daniel Patterson <span dir="ltr"><<a href="mailto:daniel@mapbox.com" target="_blank">daniel@mapbox.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Franccois,<div><br></div><div> 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.</div><div><br></div><div> Set `is_startpoint` to true for your substations way areas, and `is_startpoint` to false for the transmission lines.</div></div></blockquote><div><br></div></span><div>That's exactly what I need, thank you<br></div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div> 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.</div></div></blockquote><div><br></div></span><div>It doesn't matter indeed.</div><div>But it may be an issue that power lines aren't actually connected to substation perimeter ?</div><div><br></div><div>Like this one : <a href="https://www.openstreetmap.org/way/100500802" target="_blank">https://www.openstreetmap.org/<wbr>way/100500802</a></div><div>The outside edge of the substation is the fence surrounding it and power lines goes above it without connection.</div><div><br></div><div>Should I preprocess my data to make it more accessible to osrm or there's other way ?</div><div><br></div><div>Francois<br></div></div><br></div></div>
<br></div></div><span>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
<br></span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div></div></div>
<br>______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>