From 7b441ab766b18b52a7556cf183b0c0118442f07f Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Thu, 9 May 2019 18:06:40 -0400 Subject: [PATCH] Don't flag unsquare buildings connected to building multipolygons --- modules/validations/unsquare_way.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/validations/unsquare_way.js b/modules/validations/unsquare_way.js index 139af01cb..68ed4403f 100644 --- a/modules/validations/unsquare_way.js +++ b/modules/validations/unsquare_way.js @@ -43,7 +43,12 @@ export function validationUnsquareWay() { var hasConnectedSquarableWays = nodes.some(function(node) { return graph.parentWays(node).some(function(way) { if (way.id === entity.id) return false; - return isBuilding(way, graph); + if (isBuilding(way, graph)) return true; + return graph.parentRelations(way).some(function(parentRelation) { + return parentRelation.isMultipolygon() && + parentRelation.tags.building && + parentRelation.tags.building !== 'no'; + }); }); }); if (hasConnectedSquarableWays) return [];