You need to implement the parse_maxheight function. —Dennis
Am 21.03.2014 um 07:17 schrieb Joseba Bolinaga <[email protected]>: > Hi Dennis, > > could you say to me where i must put this code: > > local maxheight_value = -1; > if maxheight then > maxheight_value = parse_maxheight(maxheight) > end > > if maxheight_value >0 and maxheight_value < maxheight_threshold then > return > > I have written it just after "--Check if we are allowed to access the way" > paragraph, but when i run osrm-prepare i get this response: " > --profile.lua:125: attempt to call global 'parse_maxheight' (a nil value). > [error extractor/baseparser.cpp:93] lua runtime error". > > I know my computer skills are very limited and my english is very poor, so i > would understand that you can´t help me. > > Regards, > > Joseba Bolinaga > > I know > end > > > On Mon, Aug 12, 2013 at 10:29 AM, Dennis Luxen <[email protected]> wrote: > Hello Joseba, > > > i would like to know what says the profile used by your public routing > > service > > at http://map.project-osrm.org. I've noticed that server takes into > > consideration "no_left_turn" restriction. > > It is the car profile from develop branch. Nothing special in that sense. > > > I have set up a local server > > with the default profile and it doesn´t take into consideration that > > restriction. > > Please check if the restriction is in your data, too. > > > Another cuestion: i need help to implement maxheight restriction. i > > don´t know how the sintaxis must be written. Can anyone help to me??? > > Assuming that height restrictions are tagged like [1] you need to adapt > way_function in the profile. First extract the maxheight: > > local maxheight = way.tags:Find("maxheight") > > This gives you a string that you need to parse. According to the wiki it can > be given in several formats, i.e. meters, feet and inches, etc. You need to > develop a function that gives a number to compare. E.g. normalize everything > to meters. So, your code could like a bit like this: > > local maxheight_value = -1; > if maxheight then > maxheight_value = parse_maxheight(maxheight) > end > > if maxheight_value >0 and maxheight_value < maxheight_threshold then > return > end > > Best regards, > Dennis > > [1] http://wiki.openstreetmap.org/wiki/Maxheight > > > > _______________________________________________ > OSRM-talk mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/osrm-talk > _______________________________________________ OSRM-talk mailing list [email protected] https://lists.openstreetmap.org/listinfo/osrm-talk
