Changeset 17412 in josm for trunk


Ignore:
Timestamp:
2020-12-17T09:05:00+01:00 (2 months ago)
Author:
GerdP
Message:

see #20019: Warn about direction=forward/backward on invalid nodes.

  • simplify source
  • improve test coverage
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/nodist/data/direction-nodes.osm

    r17411 r17412  
    159159  <node id='-144723' action='modify' lat='53.27823974497' lon='10.50137387831' />
    160160  <node id='-144724' action='modify' lat='53.27870193125' lon='10.50143333846' />
     161  <node id='-146142' action='modify' lat='53.27290140259' lon='10.48960591385'>
     162    <tag k='josm_error_codes' v='none' />
     163    <tag k='railway' v='signal' />
     164    <tag k='railway:signal:direction' v='backward' />
     165    <tag k='railway:signal:main' v='DE-ESO:hp' />
     166  </node>
     167  <node id='-146143' action='modify' lat='53.27225584935' lon='10.48380857446' />
     168  <node id='-146144' action='modify' lat='53.27273403788' lon='10.48706707901' />
     169  <node id='-146145' action='modify' lat='53.27243517068' lon='10.4949034826' />
     170  <node id='-146335' action='modify' lat='53.27934444006' lon='10.48595759819'>
     171    <tag k='josm_error_codes' v='none' />
     172    <tag k='no-direction' v='forward' />
     173  </node>
     174  <node id='-146398' action='modify' lat='53.27714060081' lon='10.50161458004' />
     175  <node id='-146399' action='modify' lat='53.27713665242' lon='10.49994200201' />
     176  <node id='-146400' action='modify' lat='53.27717084787' lon='10.49766338186' />
     177  <node id='-146401' action='modify' lat='53.27759064616' lon='10.50129126057' />
     178  <node id='-146402' action='modify' lat='53.2771323983' lon='10.50028704473' />
     179  <node id='-146403' action='modify' lat='53.27713665037' lon='10.50255933573' />
     180  <node id='-146404' action='modify' lat='53.27762909533' lon='10.4986675977' />
     181  <node id='-146405' action='modify' lat='53.27712844786' lon='10.50123180042' />
     182  <node id='-146406' action='modify' lat='53.27739742094' lon='10.5021773809'>
     183    <tag k='direction' v='backward' />
     184    <tag k='highway' v='traffic_signals' />
     185    <tag k='josm_error_codes' v='4000' />
     186  </node>
     187  <node id='-146407' action='modify' lat='53.27774106242' lon='10.50167404018' />
     188  <node id='-146408' action='modify' lat='53.27774106447' lon='10.49905670647' />
     189  <node id='-146409' action='modify' lat='53.27759884858' lon='10.50261879588' />
     190  <node id='-146410' action='modify' lat='53.27759885064' lon='10.50000146216' />
     191  <node id='-146411' action='modify' lat='53.27739742299' lon='10.49956004718'>
     192    <tag k='direction' v='backward' />
     193    <tag k='highway' v='traffic_signals' />
     194    <tag k='josm_error_codes' v='4000' />
     195  </node>
     196  <node id='-146412' action='modify' lat='53.27777130906' lon='10.497722842' />
     197  <node id='-146413' action='modify' lat='53.27738921849' lon='10.50084984559'>
     198    <tag k='direction' v='backward' />
     199    <tag k='highway' v='traffic_signals' />
     200    <tag k='josm_error_codes' v='4000' />
     201  </node>
     202  <node id='-146414' action='modify' lat='53.27714060286' lon='10.49899724632' />
     203  <node id='-146415' action='modify' lat='53.27742766784' lon='10.49822618272'>
     204    <tag k='direction' v='backward' />
     205    <tag k='highway' v='traffic_signals' />
     206    <tag k='josm_error_codes' v='4000' />
     207  </node>
     208  <node id='-146416' action='modify' lat='53.27716689744' lon='10.49860813755' />
     209  <node id='-146417' action='modify' lat='53.27773286002' lon='10.50034650488' />
     210  <node id='-146863' action='modify' lat='53.27533459507' lon='10.49884421594' />
     211  <node id='-146864' action='modify' lat='53.27532563791' lon='10.49884611594' />
     212  <node id='-146865' action='modify' lat='53.27513542421' lon='10.49887991594' />
     213  <node id='-146866' action='modify' lat='53.27477834581' lon='10.49896861594' />
     214  <node id='-146867' action='modify' lat='53.27476979122' lon='10.49897131594'>
     215    <tag k='railway' v='signal' />
     216    <tag k='railway:signal:direction' v='backward' />
     217    <tag k='railway:signal:minor' v='DE-ESO:sh' />
     218    <tag k='railway:signal:minor:form' v='light' />
     219    <tag k='railway:signal:minor:height' v='dwarf' />
     220    <tag k='railway:signal:minor:states' v='DE-ESO:hp0;DE-ESO:sh1' />
     221    <tag k='railway:signal:position' v='left' />
     222  </node>
     223  <node id='-146868' action='modify' lat='53.27460514064' lon='10.49901821594' />
     224  <node id='-146869' action='modify' lat='53.27449171692' lon='10.49907481594' />
     225  <node id='-146870' action='modify' lat='53.27430160388' lon='10.49919371594' />
     226  <node id='-146871' action='modify' lat='53.27409035599' lon='10.49935891594'>
     227    <tag k='josm_error_codes' v='4001' />
     228    <tag k='railway' v='buffer_stop' />
     229    <tag k='railway:signal:direction' v='forward' />
     230    <tag k='railway:signal:minor' v='DE-ESO:sh0' />
     231    <tag k='railway:signal:minor:form' v='sign' />
     232    <tag k='railway:signal:position' v='in_track' />
     233  </node>
     234  <node id='-146895' action='modify' lat='53.27538354719' lon='10.49933780217' />
     235  <node id='-146896' action='modify' lat='53.27537459005' lon='10.49933970217' />
     236  <node id='-146897' action='modify' lat='53.27518437657' lon='10.49937350217' />
     237  <node id='-146898' action='modify' lat='53.27482729857' lon='10.49946220217' />
     238  <node id='-146899' action='modify' lat='53.274818744' lon='10.49946490217'>
     239    <tag k='railway' v='signal' />
     240    <tag k='railway:signal:direction' v='forward' />
     241    <tag k='railway:signal:minor' v='DE-ESO:sh' />
     242    <tag k='railway:signal:minor:form' v='light' />
     243    <tag k='railway:signal:minor:height' v='dwarf' />
     244    <tag k='railway:signal:minor:states' v='DE-ESO:hp0;DE-ESO:sh1' />
     245    <tag k='railway:signal:position' v='right' />
     246  </node>
     247  <node id='-146900' action='modify' lat='53.27465409361' lon='10.49951180217' />
     248  <node id='-146901' action='modify' lat='53.27454067002' lon='10.49956840217' />
     249  <node id='-146902' action='modify' lat='53.27435055719' lon='10.49968730217' />
     250  <node id='-146903' action='modify' lat='53.27413930954' lon='10.49985250217'>
     251    <tag k='josm_error_codes' v='4001' />
     252    <tag k='railway' v='buffer_stop' />
     253    <tag k='railway:signal:direction' v='backward' />
     254    <tag k='railway:signal:minor' v='DE-ESO:sh0' />
     255    <tag k='railway:signal:minor:form' v='sign' />
     256    <tag k='railway:signal:position' v='in_track' />
     257  </node>
    161258  <way id='-102854' action='modify'>
    162259    <nd ref='-144644' />
     
    386483    <tag k='highway' v='footway' />
    387484  </way>
     485  <way id='-102992' action='modify'>
     486    <nd ref='-146143' />
     487    <nd ref='-146144' />
     488    <nd ref='-146142' />
     489    <nd ref='-146145' />
     490    <tag k='railway' v='rail' />
     491  </way>
     492  <way id='-103050' action='modify'>
     493    <nd ref='-146402' />
     494    <nd ref='-146413' />
     495    <nd ref='-146401' />
     496    <tag k='highway' v='footway' />
     497  </way>
     498  <way id='-103051' action='modify'>
     499    <nd ref='-146406' />
     500    <nd ref='-146403' />
     501    <tag k='highway' v='footway' />
     502  </way>
     503  <way id='-103052' action='modify'>
     504    <nd ref='-146417' />
     505    <nd ref='-146413' />
     506    <tag k='highway' v='footway' />
     507  </way>
     508  <way id='-103053' action='modify'>
     509    <nd ref='-146400' />
     510    <nd ref='-146415' />
     511    <nd ref='-146404' />
     512    <tag k='highway' v='footway' />
     513  </way>
     514  <way id='-103054' action='modify'>
     515    <nd ref='-146413' />
     516    <nd ref='-146405' />
     517    <tag k='highway' v='footway' />
     518  </way>
     519  <way id='-103055' action='modify'>
     520    <nd ref='-146412' />
     521    <nd ref='-146415' />
     522    <nd ref='-146416' />
     523    <tag k='highway' v='footway' />
     524  </way>
     525  <way id='-103056' action='modify'>
     526    <nd ref='-146411' />
     527    <nd ref='-146410' />
     528    <tag k='highway' v='footway' />
     529  </way>
     530  <way id='-103057' action='modify'>
     531    <nd ref='-146414' />
     532    <nd ref='-146411' />
     533    <tag k='highway' v='footway' />
     534  </way>
     535  <way id='-103058' action='modify'>
     536    <nd ref='-146398' />
     537    <nd ref='-146406' />
     538    <tag k='highway' v='footway' />
     539  </way>
     540  <way id='-103059' action='modify'>
     541    <nd ref='-146406' />
     542    <nd ref='-146409' />
     543    <tag k='highway' v='footway' />
     544  </way>
     545  <way id='-103060' action='modify'>
     546    <nd ref='-146408' />
     547    <nd ref='-146411' />
     548    <nd ref='-146399' />
     549    <tag k='highway' v='footway' />
     550  </way>
     551  <way id='-103061' action='modify'>
     552    <nd ref='-146407' />
     553    <nd ref='-146406' />
     554    <tag k='highway' v='footway' />
     555  </way>
     556  <way id='-103201' action='modify'>
     557    <nd ref='-146863' />
     558    <nd ref='-146864' />
     559    <nd ref='-146865' />
     560    <nd ref='-146866' />
     561    <nd ref='-146867' />
     562    <nd ref='-146868' />
     563    <nd ref='-146869' />
     564    <nd ref='-146870' />
     565    <nd ref='-146871' />
     566    <tag k='gauge' v='1435' />
     567    <tag k='railway' v='rail' />
     568    <tag k='railway:traffic_mode' v='freight' />
     569    <tag k='service' v='yard' />
     570    <tag k='workrules' v='DE:EBO' />
     571  </way>
     572  <way id='-103210' action='modify'>
     573    <nd ref='-146903' />
     574    <nd ref='-146902' />
     575    <nd ref='-146901' />
     576    <nd ref='-146900' />
     577    <nd ref='-146899' />
     578    <nd ref='-146898' />
     579    <nd ref='-146897' />
     580    <nd ref='-146896' />
     581    <nd ref='-146895' />
     582    <tag k='gauge' v='1435' />
     583    <tag k='railway' v='rail' />
     584    <tag k='railway:traffic_mode' v='freight' />
     585    <tag k='service' v='yard' />
     586    <tag k='workrules' v='DE:EBO' />
     587  </way>
    388588</osm>
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DirectionNodes.java

    r17411 r17412  
    9292                        marktr("Node with {0} on end of way"), tag);
    9393            }
    94         } else if (ways.size() > 1) {
     94        } else { // ways.size() > 1
    9595            builder = TestError.builder(this, Severity.OTHER, MULTIPLE_WAYS_CODE).message(DISPUTED_USE_MSG,
    9696                    marktr("Node with {0} on a connection of multiple ways"), tag);
Note: See TracChangeset for help on using the changeset viewer.