From 73467d53b4c6eca7eb5fffcbab414d0578780e25 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 7 May 2019 14:55:57 -0400 Subject: [PATCH] Don't flag highways connected to amenity=parking_entrance nodes as disconnected Don't flag oneways with entrance endpoints as impossible --- modules/validations/disconnected_way.js | 1 + modules/validations/impossible_oneway.js | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/validations/disconnected_way.js b/modules/validations/disconnected_way.js index 262789bb0..9f0097c6a 100644 --- a/modules/validations/disconnected_way.js +++ b/modules/validations/disconnected_way.js @@ -122,6 +122,7 @@ export function validationDisconnectedWay() { // entrances are considered connected if (vertex.tags.entrance && vertex.tags.entrance !== 'no') return false; + if (vertex.tags.amenity === 'parking_entrance') return false; return !parents.some(function(parentWay) { if (parentWay === way) return false; // ignore the way we're testing diff --git a/modules/validations/impossible_oneway.js b/modules/validations/impossible_oneway.js index e7b3d2f17..3fadd735c 100644 --- a/modules/validations/impossible_oneway.js +++ b/modules/validations/impossible_oneway.js @@ -65,6 +65,12 @@ export function validationImpossibleOneway() { var node = context.hasEntity(nodeID); + if (wayType === 'highway') { + // entrances are considered connected + if (node.tags.entrance && node.tags.entrance !== 'no') return []; + if (node.tags.amenity === 'parking_entrance') return []; + } + // ignore if this node or its tile are unloaded if (!node || !osm.isDataLoaded(node.loc)) return [];