don't trigger line-is-area warning for tags implemented as 2 geometry-dedicated presets

e.g. `highway=elevator` in the "Elevator" and "Inclined Lift" presets
This commit is contained in:
Martin Raifer
2023-07-15 19:44:32 +02:00
parent 14fd5bc2c0
commit bb5e9e063d
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -43,6 +43,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :camera: Street-Level
#### :white_check_mark: Validation
#### :bug: Bugfixes
* Validator: Don't falsely flag certain tags as "should be a closed area" if the tag also allows both area and line geometries in two separate presets (e.g. `highway=elevator` in the "Elevator" and "Inclined Lift" presets)
#### :earth_asia: Localization
#### :hourglass: Performance
#### :mortar_board: Walkthrough / Help
+2 -1
View File
@@ -1,4 +1,5 @@
import deepEqual from 'fast-deep-equal';
import { actionAddVertex } from '../actions/add_vertex';
import { actionChangeTags } from '../actions/change_tags';
import { actionMergeNodes } from '../actions/merge_nodes';
@@ -27,7 +28,7 @@ export function validationMismatchedGeometry() {
var asLine = presetManager.matchTags(tagSuggestingArea, 'line');
var asArea = presetManager.matchTags(tagSuggestingArea, 'area');
if (asLine && asArea && asLine === asArea) {
if (asLine && asArea && deepEqual(asLine.tags, asArea.tags)) {
// this tag also allows lines and making this an area wouldn't matter
return null;
}