Skip to content

Commit 21419fc

Browse files
author
stoecker
committed
add Check for trees that are too big, patch by gaben, fix #23621
git-svn-id: https://josm.openstreetmap.de/svn/trunk@19129 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent 09b8389 commit 21419fc

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

resources/data/validator/combinations.mapcss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ way[highway][crossing][highway =~ /^(motorway|motorway_link|trunk|trunk_link|pri
896896
}
897897

898898
/* #16898, tower vs. communications_tower, wiki suggests 100m as rough guideline, so we warn for < 75m */
899-
*[man_made=communications_tower][height][height =~ /^((7[0-4]|[1-6]?[0-9])(\.[0-9]*)?( m)?|(2(4[0-5]|[0-3][0-9])|1?[0-9]?[0-9])((\.[0-9]*)?( ft|\')|\'(11|10|[0-9])(\.[0-9]*)?\"))$/] { /* 75m ~ 246ft ~ 246' */
899+
*[man_made=communications_tower][height][siunit_length(tag(height)) < 75] {
900900
throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
901901
suggestAlternative: "man_made=tower + tower:type=communication + height";
902902
group: tr("suspicious tag combination");
@@ -1065,4 +1065,3 @@ area[/^(building|building:part)$/][building:levels][building:min_level][tag("bui
10651065
throwWarning: tr("{0} is lower or equal to {1} on {2}", "{1.key}", "{2.key}", "{0.key}");
10661066
group: tr("suspicious tag combination");
10671067
}
1068-

resources/data/validator/numeric.mapcss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,3 +662,13 @@ node[fire_hydrant:pressure="#"] {
662662
assertMatch: "node name=3.5";
663663
assertNoMatch: "node name=\"1. Chemnitzer Billardclub 1952 e.V.\"";
664664
}
665+
666+
/* #23621 */
667+
node[natural=tree][circumference][siunit_length(tag(circumference)) > 45] {
668+
throwWarning: tr("Unusually large value of {0} in meters, possibly centimeter units are meant?", "{0.key}");
669+
assertMatch: "node natural=tree circumference=200";
670+
assertMatch: "node natural=tree circumference=82.4";
671+
assertNoMatch: "node natural=tree circumference=18.4";
672+
assertNoMatch: "node natural=tree circumference=\"100 cm\"";
673+
assertNoMatch: "node natural=tree circumference=43"; /* Current world record */
674+
}

0 commit comments

Comments
 (0)