Open Bairdo opened 3 years ago
I think I've answered my own question for the most part. And Lua profiles seem to be the answer.
Basically add the tag you want to the appropriate whitelist (explanation of each is on the above link). Then it can be accessed as a member of the attributes in factor_and_speed - In my case add it to the result.
In particular
...
-- whitelists for profile and meta
profile_whitelist = {
"highway",
"surface"
}
meta_whitelist = {
"name",
"surface"
}
...
-- the main function turning attributes into a factor_and_speed and a tag whitelist
function factor_and_speed (attributes, result)
...
result.attributes_to_keep = {}
result.attributes_to_keep.surface = attributes.surface
...
end
Although the minimal example didn't work (the database kept being empty) so used the default car as the base.
Hi, I am trying to use the 'surface' tag of OSM for a couple of things:
Is there something I need to do to enable it (e.g. An Extension) or is it unsupported? I haven't been able to figure it out yet. Thanks
Snapshot of what my route.GeoJSON(...)