Changes between Initial Version and Version 1 of Ticket #21801, comment 13


Ignore:
Timestamp:
2024-04-27T23:06:02+02:00 (21 months ago)
Author:
Famlam

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21801, comment 13

    initial v1  
    1515
    16165. `way[/railway$/][/railway$/ !~ /turntable|traverser|roundhouse|workshop/] > node.three_way_connection:connection` looks like unnecessary double checking of the tags on the way, as the `three_way_connection` class is already on the node and there's no new filtering (unless I'm missing something)
     17
     186. It doesn't find two railways that cross each other without the crossing node being an end node of either railway road
     19
     20
     21Just a quick thought, but can't it be simplified to:
     22{{{#!mapcss
     23way[railway][railway!~/^(turntable|traverser|roundhouse|workshop|platform)$/] > node[/railway$/!~/^(switch|railway_crossing)$/][count(parent_osm_primitives("railway")) > 2]:connection,
     24way[railway][railway!~/^(turntable|traverser|roundhouse|workshop|platform)$/] >[index!=1][index!=-1] node[/railway$/!~/^(switch|railway_crossing)$/][count(parent_osm_primitives("railway")) == 2]:connection {
     25  set missing_switch_railwaycrossing;
     26}
     27node.missing_switch_railwaycrossing {
     28  throwError: tr("Railways connection node without {0} or {1}", "railway=switch", "railway=railway_crossing");
     29  group: tr("missing tag");
     30}
     31}}}
     32(This doesn't fix the item at 2 yet, which requires filtering on the counted parent tags).