source: josm/trunk/test/data/regress/20041/circle-action.osm

Last change on this file was 17393, checked in by GerdP, 4 years ago

see #10205: Strange align nodes in circle behavior

  • allow to define center node also when a single unclosed way is selected
  • add robustness and more unit tests for evaluation of valid selections
  • if only nodes and no way are selected, order the nodes using the angle to the agv. east-north position. This should produce a predictable result
  • if way(s) are selected the order the nodes is determined by the occurence in the way(s). Self-Intersecting polygons are rejected if no center node is given
  • don't throw InvalidSelection when selection is valid but no point was moved, let buildCommand() return null instead

With a selection that gives a center point and way(s) which are not even close to a circular shape the result might still be surprising. Sometimes the way nodes are arranged around the center node, sometimes they are moved so that a circle arc with nearly the same length is produced. The result changes significantly when the way nodes are also selected. Subject to further improvements.

File size: 2.9 KB
Line 
1<?xml version='1.0' encoding='UTF-8'?>
2<osm version='0.6' generator='JOSM'>
3 <node id='3353142168' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90029704945' lon='8.44321406009' />
4 <node id='3353142170' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90031807489' lon='8.44326193915' />
5 <node id='3353142171' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90030468523' lon='8.44306677855' />
6 <node id='3353142174' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90033729149' lon='8.44301884234' />
7 <node id='3353142175' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90034976283' lon='8.44329321571' />
8 <node id='3353142183' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90040118461' lon='8.44329685665' />
9 <node id='3353142184' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.9004078959' lon='8.44300955386' />
10 <node id='3353142189' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90046511808' lon='8.44319779138' />
11 <node id='3353142190' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90044790476' lon='8.44305434646' />
12 <node id='3353142192' action='modify' timestamp='2015-02-15T23:33:27Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323' lat='52.90046284581' lon='8.44309505092' />
13 <way id='-104527' action='modify' visible='true'>
14 <nd ref='3353142171' />
15 <nd ref='3353142168' />
16 <nd ref='3353142170' />
17 <nd ref='3353142175' />
18 <nd ref='3353142183' />
19 <nd ref='3353142189' />
20 <nd ref='3353142192' />
21 <nd ref='3353142190' />
22 <nd ref='3353142184' />
23 <nd ref='3353142174' />
24 <nd ref='3353142171' />
25 <tag k='barrier' v='fence' />
26 </way>
27 <way id='328483730' timestamp='2015-02-15T23:33:35Z' uid='715371' user='715371' visible='true' version='1' changeset='28875323'>
28 <nd ref='3353142174' />
29 <nd ref='3353142184' />
30 <nd ref='3353142190' />
31 <nd ref='3353142192' />
32 <nd ref='3353142189' />
33 <nd ref='3353142183' />
34 <nd ref='3353142175' />
35 <nd ref='3353142170' />
36 <nd ref='3353142168' />
37 <nd ref='3353142171' />
38 <nd ref='3353142174' />
39 <tag k='natural' v='water' />
40 </way>
41</osm>
Note: See TracBrowser for help on using the repository browser.