Opened 12 years ago
Closed 12 years ago
#9683 closed enhancement (duplicate)
Detect missing railway=level_crossing
| Reported by: | naoliv | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core validator | Version: | |
| Keywords: | Cc: |
Description
Could JOSM detect (and autofix, if possible), missing railway=level_crossing (railway intersecting with highway != footway|path) and railway=crossing (railway intersecting with highway = footway|path)?
Attachments (1)
Change History (6)
comment:1 by , 12 years ago
by , 12 years ago
| Attachment: | crossing.osm added |
|---|
comment:2 by , 12 years ago
I can't see anything with the attached example.
Note that I am talking about the intersection node (it misses a railway=level_crossing)
comment:3 by , 12 years ago
Confirmed. I tested without a the node at the crossing …
An unfinished MapCSS test (which matches every node if a way has both highway and railway set)
node[railway!=level_crossing][has_parent_tag("highway")][not(regexp_test("footway|path", parent_tag("highway")))][has_parent_tag("railway")] { throwWarning: tr("highway/railway crossing without {0}", "{0.tag}"); fixAdd: "railway=level_crossing"; } node[railway!=crossing][has_parent_tag("highway")][regexp_test("footway|path", parent_tag("highway"))][has_parent_tag("railway")] { throwWarning: tr("highway/railway crossing without {0}", "{0.tag}"); fixAdd: "railway=crossing"; }
With the following MapCSS function added.
-
src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
diff --git a/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java b/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java index d0e47a8..1415400 100644
a b public final class ExpressionFactory { 324 324 return env.parent.get(key); 325 325 } 326 326 327 public boolean has_parent_tag(String key) { 328 String parentTag = parent_tag(key); 329 return parentTag != null && !parentTag.isEmpty(); 330 } 331 327 332 /** 328 333 * Determines whether the object has a tag with the given key. 329 334 */
comment:5 by , 12 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
| Type: | defect → enhancement |
Closed as duplicate of #9298.



JOSM currently warns "Crossing ways" when a
railwayand ahighwaycross …