mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[routing] Add faux oneways for motor_vehicle and vehicle forward/backward
Signed-off-by: Eivind Samseth <eisa01@gmail.com> Co-authored-by: Eivind Samseth <eisa01@gmail.com> Co-committed-by: Eivind Samseth <eisa01@gmail.com>
This commit is contained in:
@@ -1140,7 +1140,22 @@ void PostprocessElement(OsmElement * p, FeatureBuilderParams & params)
|
||||
// And most of this junctions are assumed to be oneway.
|
||||
{"junction", "circular", [&addOneway] { addOneway = true; }},
|
||||
{"junction", "roundabout", [&addOneway] { addOneway = true; }},
|
||||
|
||||
// Add faux oneways as access keys don't support forward/backward modifiers
|
||||
// Bicycles are not motor vehicles, so don't add oneways for them.
|
||||
{"motor_vehicle:backward", "no", [&addOneway] { addOneway = true; }},
|
||||
{"vehicle:backward", "no", [&addOneway] { addOneway = true; }},
|
||||
{"motor_vehicle:forward", "no",
|
||||
[&addOneway, ¶ms] {
|
||||
addOneway = true;
|
||||
params.SetReversedGeometry(true);
|
||||
}},
|
||||
{"vehicle:forward", "no",
|
||||
[&addOneway, ¶ms] {
|
||||
addOneway = true;
|
||||
params.SetReversedGeometry(true);
|
||||
}},
|
||||
{"motor_vehicle:backward", "no", [&AddParam] { AddParam(CachedTypes::BicycleBidir); }},
|
||||
{"motor_vehicle:forward", "no", [&AddParam] { AddParam(CachedTypes::BicycleBidir); }},
|
||||
{"access", "private", [&AddParam] { AddParam(CachedTypes::Private); }},
|
||||
{"access", "!", [&AddParam] { AddParam(CachedTypes::Private); }},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user