<div dir="ltr">Hi Julien, Frederik.<div><br></div><div>  We really appreciate your comments. Are very useful guides to plan the first steps of a potential POC. </div><div><br></div><div>  We will definitely report the findings we can get to help others with similar issues and/or ask you for further guidance on this or other topics. Thanks in advance.</div><div><br></div><div>  Alex Valencia</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 26, 2020 at 4:34 AM Frederik Ramm <<a href="mailto:frederik@remote.org">frederik@remote.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Or, what Julien said ;)<br>
<br>
On 26.08.20 10:31, Frederik Ramm wrote:<br>
> Hi,<br>
> <br>
> On 26.08.20 03:29, Alex Valencia wrote:<br>
>>   So I was thinking if there is a proper way to achieve this goal. We<br>
>> are considering separating the matrix calculation over the map in a<br>
>> separate function and feeding it with a decorated version of the<br>
>> original map where we can remove these regions on the fly prior to the<br>
>> calculation. But I'm also not sure if this is a realistic way either.<br>
> <br>
> The only routing package I know that does polygonal avoid areas out of<br>
> the box is OpenRouteService which internally is powered by a modified<br>
> version of GraphHopper. However, only the simple route request supports<br>
> avoid areas, not the matrix request, and it's only available if you use<br>
> basic A*.<br>
> <br>
> Using avoid areas with Contraction Hierarchies is impossible unless the<br>
> avoid areas are baked into the graph (i.e. known at graph building<br>
> time). If your avoid areas *are* known at graph building time then<br>
> actually removing edges from the OSM data (or doing so while reading it<br>
> into OSRM) is certainly option that gives you the fastest routing speed.<br>
> <br>
> If you want to use OSRM, and if you want to use dynamic avoid areas,<br>
> then this *might* be possible with a MLD routing graph which has the<br>
> option of changing the weighting of certain edges without re-generating<br>
> the graph; this was implemented to allow for live traffic (search for<br>
> "osrm traffic" and you'll find some stuff about it, using<br>
> osrm-customize). However this still requires you to identify the edges<br>
> you wish to cut off (by giving them a zero rating), and it is only<br>
> possible globally and not on a per-request basis (unlike<br>
> OpenRouteService which lets you set avoid areas per-request).<br>
> <br>
> If you have a number of pre-defined avoid areas and want to determine<br>
> dynamically which of these should be avoided then it might be possible<br>
> to abuse a feature that was built to avoid certain road classes (i.e.<br>
> avoid motorways, avoid ferries); potentially you could use that to<br>
> define a specific road class for all roads in your avoid area A, a<br>
> different class for avoid area B etc., and then make a routing request<br>
> that "avoids class A". This feature is documented here<br>
> <a href="https://github.com/Project-OSRM/osrm-backend/issues/4006" rel="noreferrer" target="_blank">https://github.com/Project-OSRM/osrm-backend/issues/4006</a><br>
> <br>
> Bye<br>
> Frederik<br>
> <br>
<br>
-- <br>
Frederik Ramm  ##  eMail <a href="mailto:frederik@remote.org" target="_blank">frederik@remote.org</a>  ##  N49°00'09" E008°23'33"<br>
<br>
_______________________________________________<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.org/listinfo/osrm-talk</a><br>
</blockquote></div>