[OSRM-talk] Multiple profiles

Emil Tin emil at tin.dk
Sat Jul 19 06:45:17 UTC 2014


In your lua file, first get the highway tag:

  local highway = way.tags:Find("highway")

Then chech the value and either return false to completely ignore the way,
or return a low speed to make it unattractive, but still passable.

If you just want to modify the file profiles/car.lua, you can simple remove
these two lines:

  ["motorway"] = 90,
  ["motorway_link"] = 75,



On Wed, Jul 16, 2014 at 6:30 PM, Cédric NOËL <cedric.noel at actimage.com>
wrote:

> Hi,
>
> Sorry for asking again... does anyone has any tips to help me with profile
> lua files ? :-)
>
> Cédric
>
>
> -----Message d'origine-----
> De : Cédric NOËL [mailto:cedric.noel at actimage.com]
> Envoyé : jeudi 10 juillet 2014 17:06
> À : 'Mailing list to discuss Project OSRM'
> Objet : Re: [OSRM-talk] Multiple profiles
>
> Thanks for your reply Frederik, it's ok to select the profile we want to
> use.
>
> Now, we wonder how to change the car.lua in order to forbid motorways for
> cars.
> Do you have any idea or some example to do that ?
>
> Thanks!
>
> Cédric NOËL | Technical Project Manager | ACTIMAGE Consulting
> SAS   Business
> Unit : 1 rue Saint-Léon F-67000 STRASBOURG    :  Siège social : 15, rue du
> Louvre F-75001 PARIS
>
>
>
>
> -----Message d'origine-----
> De : Frederik Ramm [mailto:frederik at remote.org] Envoyé : mercredi 9
> juillet
> 2014 21:03 À : osrm-talk at openstreetmap.org Objet : Re: [OSRM-talk]
> Multiple
> profiles
>
> Hi,
>
> On 07/09/2014 02:42 PM, Cédric NOËL wrote:
> > We think that we can do it with different lua profiles (As for the
> > bike profile we hope that motorways are skipped ;-)).
>
> Note that there are a number of countries where cycling on motorways is
> allowed and sometimes even recommended:
>
> http://cycleseven.org/cycling-on-the-motorway
>
> > ./osrm-routed map.osrm -t 1 -p 5000
> > ./osrm-routed map_motorways_banned.osrm -t 1 -p 5001
>
> Yes, this works.
>
> > -              We do not really understand how lua profiles are managed
> > / what we can change to do it
>
> When processing data into a routing graph, the file profile.lua is used.
> You can make this point to one of several pre-made profiles in the profiles
> subdirectory, or simply replace it with whatever you want to use.
>
> Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00'09" E008°23'33"
>
> _______________________________________________
> 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/20140719/bfa49be6/attachment.html>


More information about the OSRM-talk mailing list