source: josm/trunk/test/data/regress/18367/split-and-reverse.osm @ 15574

Last change on this file since 15574 was 15574, checked in by GerdP, 20 months ago

fix #18367 and #18385: CombineWayAction (C) refuses to combine ways or silently reverses ways

  • try first to combine the ways with the method Multipolygon.joinWays() If that method returns a single line string we can use it, else use the result of NodeGraph.buildSpanningPathNoRemove(). Both methods will not add or remove segments
  • if ways are combined execute checks for overlapping segments or self-intersection and show a notification popup right after the command was added to the UndoRedoHandler
  • The code which handles reversed ways needed changes. In the unpatched version it sometimes claims wrongly that ways were reversed, in special cases it sometimes silently reverted ways. The old code did not handle the case properly that a node can appear more than once. I really hope that I got it right now.
  • Fix some sonarlint issues
  • let NodeGraph routines return an ArrayList instead of a LinkedList (improves performance a bit)
  • Add unit tests
File size: 874 bytes
1<?xml version='1.0' encoding='UTF-8'?>
2<osm version='0.6' generator='JOSM'>
3  <node id='-202121' action='modify' visible='true' lat='0.03681838663' lon='0.00176729094' />
4  <node id='-202123' action='modify' visible='true' lat='0.03673994598' lon='0.00172212813' />
5  <node id='-202125' action='modify' visible='true' lat='0.03669478317' lon='0.00181245375' />
6  <node id='-202127' action='modify' visible='true' lat='0.03675539641' lon='0.00186118205' />
7  <node id='-202129' action='modify' visible='true' lat='0.03645589572' lon='0.00185761657' />
8  <way id='-202132' action='modify' visible='true'>
9    <nd ref='-202121' />
10    <nd ref='-202123' />
11    <nd ref='-202125' />
12    <nd ref='-202127' />
13    <nd ref='-202121' />
14  </way>
15  <way id='-202133' action='modify' visible='true'>
16    <nd ref='-202125' />
17    <nd ref='-202129' />
18  </way>
Note: See TracBrowser for help on using the repository browser.