Changeset 19163 in josm for trunk/resources/data/validator


Ignore:
Timestamp:
2024-08-05T18:40:38+02:00 (4 months ago)
Author:
taylor.smock
Message:

Fix #21801: Add railway junction check for missing switches and crossings (patch by gaben)

Additional notes:
If a mapper has left non-existent railways in OSM, then this will produce false positives.
With that said, non-existent railways don't belong in OSM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/geometry.mapcss

    r18921 r19163  
    283283node:unconnected:in-downloaded-area[railway=level_crossing],
    284284node:unconnected:in-downloaded-area[railway=milestone],
    285 node:unconnected:in-downloaded-area[railway=railway_crossing],
    286 node:unconnected:in-downloaded-area[railway=switch],
    287285node:unconnected:in-downloaded-area[public_transport=stop_position],
    288286node:unconnected:in-downloaded-area[aeroway=holding_position],
     
    425423  throwWarning: tr("Ferry route is not connected to a ferry terminal or branches.");
    426424}
     425
     426/* #21801 */
     427way[railway][railway !~ /^(turntable|traverser|roundhouse|workshop|platform)$/] > node[/railway$/ !~ /^(switch|railway_crossing)$/][count(parent_osm_primitives("railway")) > 2]:connection,
     428way[railway][railway !~ /^(turntable|traverser|roundhouse|workshop|platform)$/] >[index!=1][index!=-1] node[/railway$/ !~ /^(switch|railway_crossing)$/][count(parent_osm_primitives("railway")) == 2]:connection {
     429  set missing_switch_railway_crossing;
     430}
     431node.missing_switch_railway_crossing {
     432  throwWarning: tr("Railways connection node without {0} or {1}", "railway=switch", "railway=railway_crossing");
     433  group: tr("missing tag");
     434}
     435node[railway=railway_crossing]!:connection:in-downloaded-area,
     436node[railway=switch]!:connection:in-downloaded-area {
     437  throwWarning: tr("{0}", "{0.tag}");
     438  group: tr("Node should be connected to two or more ways");
     439}
Note: See TracChangeset for help on using the changeset viewer.