Modify ↓
#17108 closed defect (fixed)
Should not warn about unclosed way with natural=tree
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 18.12 |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
Have an unclosed way with natural=tree
and validate it.
We can see 2 warnings:
natural=tree on a way. Should be used on a node.
Unclosed way - natural type tree
The first warning is right while the second not.
I am not really sure if this is the most correct solution but it solves the problem:
-
src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
diff --git a/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java b/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java index e44a5b440..cc306c4cb 100644
a b public class UnclosedWays extends Test { 135 135 private static final UnclosedWaysCheck[] checks = { 136 136 // CHECKSTYLE.OFF: SingleSpaceSeparator 137 137 new UnclosedWaysCheck(1101, "natural", marktr("natural type {0}"), 138 new HashSet<>(Arrays.asList("cave", "coastline", "cliff", "tree _row", "ridge", "valley", "arete", "gorge", "gully"))),138 new HashSet<>(Arrays.asList("cave", "coastline", "cliff", "tree", "tree_row", "ridge", "valley", "arete", "gorge", "gully"))), 139 139 new UnclosedWaysCheck(1102, "landuse", marktr("landuse type {0}")), 140 140 new UnclosedWaysCheck(1103, "amenities", marktr("amenities type {0}")), 141 141 new UnclosedWaysCheck(1104, "sport", marktr("sport type {0}"),
Attachments (0)
Change History (5)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Taginfo shows a lot more natural values that can be used on nodes. We have a mapcss rule that treats peak, saddle, volcano, and tree the same. So I think we must add those to avoid duplicate messages.
comment:3 by , 6 years ago
With the new values (also sorted them):
-
src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java
diff --git a/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java b/src/org/openstreetmap/josm/data/validation/tests/UnclosedWays.java index e44a5b440..58d8f6621 100644
a b public class UnclosedWays extends Test { 135 135 private static final UnclosedWaysCheck[] checks = { 136 136 // CHECKSTYLE.OFF: SingleSpaceSeparator 137 137 new UnclosedWaysCheck(1101, "natural", marktr("natural type {0}"), 138 new HashSet<>(Arrays.asList(" cave", "coastline", "cliff", "tree_row", "ridge", "valley", "arete", "gorge", "gully"))),138 new HashSet<>(Arrays.asList("arete", "cave", "cliff", "coastline", "gorge", "gully", "peak", "ridge", "saddle", "tree", "tree_row", "valley", "volcano"))), 139 139 new UnclosedWaysCheck(1102, "landuse", marktr("landuse type {0}")), 140 140 new UnclosedWaysCheck(1103, "amenities", marktr("amenities type {0}")), 141 141 new UnclosedWaysCheck(1104, "sport", marktr("sport type {0}"),
comment:5 by , 6 years ago
Milestone: | → 18.12 |
---|
Note:
See TracTickets
for help on using tickets.
It looks perfectly correct to me.