File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -255,3 +255,15 @@ export function isColourValid(value) {
255255 }
256256 return true ;
257257}
258+
259+ // https://wiki.openstreetmap.org/wiki/Special:WhatLinksHere/Property:P44
260+ export var osmMutuallyExclusiveTagPairs = [
261+ [ 'noname' , 'name' ] ,
262+ [ 'noref' , 'ref' ] ,
263+ [ 'nohousenumber' , 'addr:housenumber' ] ,
264+ [ 'noaddress' , 'addr:housenumber' ] ,
265+ [ 'noaddress' , 'addr:housename' ] ,
266+ [ 'noaddress' , 'addr:unit' ] ,
267+ [ 'addr:nostreet' , 'addr:street' ]
268+ ] ;
269+
Original file line number Diff line number Diff line change @@ -2,20 +2,13 @@ import { actionChangeTags } from '../actions/change_tags';
22import { t } from '../core/localizer' ;
33import { utilDisplayLabel } from '../util' ;
44import { validationIssue , validationIssueFix } from '../core/validation' ;
5+ import { osmMutuallyExclusiveTagPairs } from '../osm/tags' ;
56
67export function validationMutuallyExclusiveTags ( /* context */ ) {
78 const type = 'mutually_exclusive_tags' ;
89
910 // https://wiki.openstreetmap.org/wiki/Special:WhatLinksHere/Property:P44
10- const tagKeyPairs = [
11- [ 'noname' , 'name' ] ,
12- [ 'noref' , 'ref' ] ,
13- [ 'nohousenumber' , 'addr:housenumber' ] ,
14- [ 'noaddress' , 'addr:housenumber' ] ,
15- [ 'noaddress' , 'addr:housename' ] ,
16- [ 'noaddress' , 'addr:unit' ] ,
17- [ 'addr:nostreet' , 'addr:street' ]
18- ] ;
11+ const tagKeyPairs = osmMutuallyExclusiveTagPairs ;
1912
2013 const validation = function checkMutuallyExclusiveTags ( entity /*, graph */ ) {
2114
You can’t perform that action at this time.
0 commit comments