Add cycle_network_ref legacy
This commit is contained in:
parent
a164a807cf
commit
153f30f381
3 changed files with 8 additions and 2 deletions
|
@ -48,12 +48,12 @@ namespace AspectedRouting.IO.itinero1
|
|||
|
||||
var header = new List<string>
|
||||
{
|
||||
$"-- Itinero 1.0-profile, generated by AspectedRouting on {DateTime.Now:s}",
|
||||
$"-- Itinero 1.0-profile, generated by AspectedRouting on {DateTime.Now:s}",
|
||||
$"name = \"{_profile.Name}\"",
|
||||
"normalize = false",
|
||||
"vehicle_type = {" + string.Join(", ", _profile.VehicleTyps.Select(s => "\"" + s + "\"")) + "}",
|
||||
// meta_whitelist is defined in the profile file, these are tags that are included in the generated route, but are not relevant for determining weights
|
||||
"meta_whitelist = {\n \"cycle_network_colour\",\n " // cycle network colour is sneaked in here for legacy reasons
|
||||
"meta_whitelist = {\n"
|
||||
+ string.Join("\n , ", _profile.Metadata.Select(s => "\"" + s + "\""))
|
||||
+ " }",
|
||||
"profile_whitelist = {\n " + string.Join("\n , ", keys) + "\n }",
|
||||
|
|
|
@ -13,5 +13,10 @@ function legacy_relation_preprocessor(attributes, result)
|
|||
-- for the americans!
|
||||
result.attributes_to_keep.cycle_network_colour = attributes.color
|
||||
end
|
||||
|
||||
if (attributes.ref ~= nil) then
|
||||
-- for the americans!
|
||||
result.attributes_to_keep.cycle_network_ref = attributes.ref
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"tunnel",
|
||||
"colour",
|
||||
"cycle_network_colour",
|
||||
"cycle_network_ref",
|
||||
"ref",
|
||||
"status",
|
||||
"network"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue