add default implied access values for ways with "motorroad=yes"

see https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions
addresses https://github.com/openstreetmap/id-tagging-schema/issues/609
This commit is contained in:
Martin Raifer
2025-03-20 13:52:20 +01:00
parent 771ad4dbd9
commit 7d933f3875
3 changed files with 20 additions and 0 deletions
+7
View File
@@ -312,12 +312,19 @@ export function uiFieldAccess(field, context) {
if (tags[accessField]) {
return tags[accessField];
}
// implied access
// motorroad: https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions
if (tags.motorroad === 'yes' && (accessField === 'foot' || accessField === 'bicycle' || accessField === 'horse')) {
return 'no';
}
// inherited access
if (tags.vehicle && (accessField === 'bicycle' || accessField === 'motor_vehicle')) {
return tags.vehicle;
}
if (tags.access) {
return tags.access;
}
// default access by road/barrier type
for (const key in placeholdersByTag) {
if (tags[key]) {
if (placeholdersByTag[key][tags[key]] &&