Ticket #10205: 10205.2.patch

File 10205.2.patch, 64.6 KB (added by GerdP, 3 years ago)
  • src/org/openstreetmap/josm/actions/AlignInCircleAction.java

     
    1313import java.util.LinkedList;
    1414import java.util.List;
    1515import java.util.Set;
     16import java.util.SortedMap;
     17import java.util.TreeMap;
    1618import java.util.stream.Collectors;
    1719
    1820import javax.swing.JOptionPane;
     
    2931import org.openstreetmap.josm.data.osm.Way;
    3032import org.openstreetmap.josm.data.osm.visitor.paint.relations.Multipolygon;
    3133import org.openstreetmap.josm.data.osm.visitor.paint.relations.Multipolygon.JoinedWay;
     34import org.openstreetmap.josm.data.validation.tests.CrossingWays;
    3235import org.openstreetmap.josm.data.validation.tests.SelfIntersectingWay;
    3336import org.openstreetmap.josm.gui.Notification;
    3437import org.openstreetmap.josm.tools.Geometry;
     
    4245 * @author Petr Dlouhý
    4346 * @author Teemu Koskinen
    4447 * @author Alain Delplanque
     48 * @author Gerd Petermann
    4549 *
    4650 * @since 146
    4751 */
     
    146150     */
    147151    public static Command buildCommand(DataSet ds) throws InvalidSelection {
    148152        Collection<OsmPrimitive> sel = ds.getSelected();
    149         List<Node> nodes = new LinkedList<>();
     153        List<Node> selectedNodes = new LinkedList<>();
    150154        // fixNodes: All nodes for which the angle relative to center should not be modified
    151155        Set<Node> fixNodes = new HashSet<>();
    152156        List<Way> ways = new LinkedList<>();
     
    155159
    156160        for (OsmPrimitive osm : sel) {
    157161            if (osm instanceof Node) {
    158                 nodes.add((Node) osm);
     162                selectedNodes.add((Node) osm);
    159163            } else if (osm instanceof Way) {
    160164                ways.add((Way) osm);
    161165            }
    162166        }
    163167
    164         if (ways.size() == 1 && !ways.get(0).isClosed()) {
     168        // nodes on selected ways
     169        List<Node> onWay = new ArrayList<>();
     170        if (!ways.isEmpty()) {
     171            List<Node> potentialCenter = new ArrayList<>();
     172            for (Node n : selectedNodes) {
     173                if (ways.stream().anyMatch(w -> w.containsNode(n))) {
     174                    onWay.add(n);
     175                } else {
     176                    potentialCenter.add(n);
     177                }
     178            }
     179            if (potentialCenter.size() == 1) {
     180                // center is given
     181                center = potentialCenter.get(0).getEastNorth();
     182                if (onWay.size() == 1) {
     183                    radius = center.distance(onWay.get(0).getEastNorth());
     184                }
     185            } else if (potentialCenter.size() > 1) {
     186                throw new InvalidSelection(tr("Please select only one node as center."));
     187            }
     188
     189        }
     190
     191        final List<Node> nodes;
     192        if (ways.isEmpty()) {
     193            nodes = sortByAngle(selectedNodes);
     194            fixNodes.addAll(nodes);
     195        } else if (ways.size() == 1 && !ways.get(0).isClosed()) {
    165196            // Case 1
    166197            Way w = ways.get(0);
    167             if (SelfIntersectingWay.isSelfIntersecting(w)) {
    168                 throw new InvalidSelection(tr("Self-intersecting way"));
    169             }
    170 
    171198            fixNodes.add(w.firstNode());
    172199            fixNodes.add(w.lastNode());
    173             fixNodes.addAll(nodes);
    174             fixNodes.addAll(collectNodesWithExternReferrers(ways));
     200            fixNodes.addAll(onWay);
    175201            // Temporary closed way used to reorder nodes
    176202            Way closedWay = new Way(w);
    177             closedWay.addNode(w.firstNode());
    178             nodes = collectNodesAnticlockwise(Collections.singletonList(closedWay));
    179             closedWay.setNodes(null); // see #19885
    180         } else if (!ways.isEmpty() && checkWaysArePolygon(ways)) {
    181             // Case 2
    182             List<Node> inside = new ArrayList<>();
    183             List<Node> outside = new ArrayList<>();
    184 
    185             for (Node n: nodes) {
    186                 boolean isInside = ways.stream().anyMatch(w -> w.getNodes().contains(n));
    187                 if (isInside)
    188                     inside.add(n);
    189                 else
    190                     outside.add(n);
     203            try {
     204                closedWay.addNode(w.firstNode());
     205                nodes = collectNodesAnticlockwise(Collections.singletonList(closedWay));
     206            } finally {
     207                closedWay.setNodes(null); // see #19885
    191208            }
    192 
    193             if (outside.size() == 1 && inside.isEmpty()) {
    194                 center = outside.get(0).getEastNorth();
    195             } else if (outside.size() == 1 && inside.size() == 1) {
    196                 center = outside.get(0).getEastNorth();
    197                 radius = center.distance(inside.get(0).getEastNorth());
    198             } else if (inside.size() == 2 && outside.isEmpty()) {
    199                 // 2 nodes inside, define diameter
    200                 EastNorth en0 = inside.get(0).getEastNorth();
    201                 EastNorth en1 = inside.get(1).getEastNorth();
    202                 center = new EastNorth((en0.east() + en1.east()) / 2, (en0.north() + en1.north()) / 2);
     209        } else if (Multipolygon.joinWays(ways).size() == 1) {
     210            // Case 2:
     211            if (onWay.size() == 2) {
     212                // 2 way nodes define diameter
     213                EastNorth en0 = onWay.get(0).getEastNorth();
     214                EastNorth en1 = onWay.get(1).getEastNorth();
    203215                radius = en0.distance(en1) / 2;
     216                if (center == null) {
     217                    center = en0.getCenter(en1);
     218                }
    204219            }
    205 
    206             fixNodes.addAll(inside);
    207             fixNodes.addAll(collectNodesWithExternReferrers(ways));
     220            fixNodes.addAll(onWay);
    208221            nodes = collectNodesAnticlockwise(ways);
    209             if (nodes.size() < 4) {
    210                 throw new InvalidSelection(tr("Not enough nodes in selected ways."));
    211             }
    212         } else if (ways.isEmpty() && nodes.size() > 3) {
    213             // Case 3
    214             fixNodes.addAll(nodes);
    215             // No need to reorder nodes since all are fix
    216222        } else {
    217             if (ways.isEmpty() && nodes.size() <= 3)
    218                 throw new InvalidSelection(tr("Please select at least four nodes."));
    219223            throw new InvalidSelection();
    220224        }
     225        fixNodes.addAll(collectNodesWithExternReferrers(ways));
    221226
    222227        // Check if one or more nodes are outside of download area
    223228        if (nodes.stream().anyMatch(Node::isOutsideDownloadArea))
    224229            throw new InvalidSelection(tr("One or more nodes involved in this action is outside of the downloaded area."));
    225230
     231
    226232        if (center == null) {
    227             // Compute the center of nodes
    228             center = Geometry.getCenter(nodes);
     233            if (nodes.size() < 4) {
     234                throw new InvalidSelection(tr("Not enough nodes to calculate center."));
     235            }
     236            if (validateGeometry(nodes)) {
     237                // Compute the center of nodes
     238                center = Geometry.getCenter(nodes);
     239            }
    229240            if (center == null) {
    230                 throw new InvalidSelection(tr("Cannot determine center of selected nodes."));
     241                throw new InvalidSelection(tr("Cannot determine center of circle for this geometry."));
    231242            }
    232243        }
    233244
     
    285296        return new SequenceCommand(tr("Align Nodes in Circle"), cmds);
    286297    }
    287298
     299    private static List<Node> sortByAngle(final List<Node> nodes) {
     300        EastNorth sum = new EastNorth(0, 0);
     301        for (Node n : nodes) {
     302            EastNorth en = n.getEastNorth();
     303            sum = sum.add(en.east(), en.north());
     304        }
     305        final EastNorth simpleCenter = new EastNorth(sum.east()/nodes.size(), sum.north()/nodes.size());
     306
     307        SortedMap<Double, List<Node>> orderedMap = new TreeMap<>();
     308        for (Node n : nodes) {
     309            double angle = new PolarCoor(n.getEastNorth(), simpleCenter).angle;
     310            orderedMap.computeIfAbsent(angle, k-> new ArrayList<>()).add(n);
     311        }
     312        return orderedMap.values().stream().flatMap(List<Node>::stream).collect(Collectors.toList());
     313    }
     314
     315    private static boolean validateGeometry(List<Node> nodes) {
     316        Way test = new Way();
     317        test.setNodes(nodes);
     318        if (!test.isClosed()) {
     319            test.addNode(test.firstNode());
     320        }
     321
     322        try {
     323            if (CrossingWays.isSelfCrossing(test))
     324                return false;
     325            return !SelfIntersectingWay.isSelfIntersecting(test);
     326        } finally {
     327            test.setNodes(null); // see #19855
     328        }
     329    }
     330
    288331    /**
    289332     * Collect all nodes with more than one referrer.
    290333     * @param ways Ways from witch nodes are selected
     
    303346    private static List<Node> collectNodesAnticlockwise(List<Way> ways) throws InvalidSelection {
    304347        Collection<JoinedWay> rings = Multipolygon.joinWays(ways);
    305348        if (rings.size() != 1)
    306             throw new InvalidSelection();
     349            throw new InvalidSelection(); // we should never get here
    307350        List<Node> nodes = new ArrayList<>(rings.iterator().next().getNodes());
    308         if (nodes.get(0) != nodes.get(nodes.size()-1))
     351        if (nodes.get(0) != nodes.get(nodes.size() - 1))
    309352            throw new InvalidSelection();
    310353        if (Geometry.isClockwise(nodes))
    311354            Collections.reverse(nodes);
     
    323366    protected void updateEnabledState(Collection<? extends OsmPrimitive> selection) {
    324367        updateEnabledStateOnModifiableSelection(selection);
    325368    }
    326 
    327     /**
    328      * Determines if ways can be joined into a single polygon.
    329      * @param ways The ways collection to check
    330      * @return true if all ways can be joined into a single polygon
    331      */
    332     private static boolean checkWaysArePolygon(Collection<Way> ways) {
    333         if (Multipolygon.joinWays(ways).size() != 1)
    334             return false;
    335         // For each way, nodes strictly between first and last should't be reference by an other way
    336         for (Way way: ways) {
    337             for (Node node: way.getNodes()) {
    338                 if (way.isFirstLastNode(node)) continue;
    339                 if (ways.stream().filter(wayOther -> way != wayOther).anyMatch(wayOther -> node.getReferrers().contains(wayOther))) {
    340                     return false;
    341                 }
    342             }
    343         }
    344         return true;
    345     }
    346 
    347369}
  • src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

     
    2626import org.openstreetmap.josm.data.validation.TestError;
    2727import org.openstreetmap.josm.data.validation.util.ValUtil;
    2828import org.openstreetmap.josm.gui.progress.ProgressMonitor;
     29import org.openstreetmap.josm.tools.CheckParameterUtil;
    2930import org.openstreetmap.josm.tools.Logging;
    3031
    3132/**
     
    468469        }
    469470    }
    470471
     472    /**
     473     * Check if the given way is self crossing
     474     * @param way the way to check
     475     * @return {@code true} if one or more segments of the way are crossing
     476     * @see SelfIntersectingWay
     477     * @since xxx
     478     */
     479    public static boolean isSelfCrossing(Way way) {
     480        CheckParameterUtil.ensureParameterNotNull(way, "way");
     481        SelfCrossing test = new SelfCrossing();
     482        test.visit(way);
     483        return !test.getErrors().isEmpty();
     484    }
    471485}
  • test/data/alignCircleCases.osm

     
     1<?xml version='1.0' encoding='UTF-8'?>
     2<osm version='0.6' upload='never' generator='JOSM'>
     3  <bounds minlat='37.5554811' minlon='14.4612697' maxlat='37.556938' maxlon='14.4630077' origin='CGImap 0.8.3 (2936052 spike-07.openstreetmap.org)' />
     4  <bounds minlat='37.5554811' minlon='14.4612697' maxlat='37.556938' maxlon='14.4630077' origin='OpenStreetMap server' />
     5  <node id='-177365' action='modify' lat='37.55691419926' lon='14.46148123867' />
     6  <node id='-177366' action='modify' lat='37.55684485074' lon='14.46155150259' />
     7  <node id='-177367' action='modify' lat='37.55687312689' lon='14.46152268691'>
     8    <tag k='sel' v='1' />
     9  </node>
     10  <node id='-177368' action='modify' lat='37.55686036859' lon='14.4615670012' />
     11  <node id='-177369' action='modify' lat='37.5568796806' lon='14.46157247181' />
     12  <node id='-177370' action='modify' lat='37.55689896179' lon='14.46156683088' />
     13  <node id='-177371' action='modify' lat='37.55691439329' lon='14.46155119569' />
     14  <node id='-177372' action='modify' lat='37.55692291869' lon='14.46152866297' />
     15  <node id='-177373' action='modify' lat='37.55692284944' lon='14.4615036956' />
     16  <node id='-177374' action='modify' lat='37.55689868142' lon='14.46146574006' />
     17  <node id='-177375' action='modify' lat='37.55687936941' lon='14.46146026946' />
     18  <node id='-177376' action='modify' lat='37.55686008821' lon='14.46146591038' />
     19  <node id='-177377' action='modify' lat='37.55684465671' lon='14.46148154557' />
     20  <node id='-177378' action='modify' lat='37.5568361313' lon='14.4615040783' />
     21  <node id='-177379' action='modify' lat='37.55683620055' lon='14.46152904567' />
     22  <node id='-177380' action='modify' lat='37.55691716886' lon='14.46163544625'>
     23    <tag k='sel' v='2' />
     24  </node>
     25  <node id='-177381' action='modify' lat='37.55684048956' lon='14.4617253193' />
     26  <node id='-177382' action='modify' lat='37.55685600743' lon='14.46174081791' />
     27  <node id='-177383' action='modify' lat='37.55687531944' lon='14.46174628852' />
     28  <node id='-177384' action='modify' lat='37.55689460063' lon='14.46174064759' />
     29  <node id='-177385' action='modify' lat='37.55691003212' lon='14.4617250124' />
     30  <node id='-177386' action='modify' lat='37.55691855752' lon='14.46170247968' />
     31  <node id='-177387' action='modify' lat='37.55691848827' lon='14.46167751231' />
     32  <node id='-177388' action='modify' lat='37.5569098381' lon='14.46165505538' />
     33  <node id='-177389' action='modify' lat='37.55689432026' lon='14.46163955677' />
     34  <node id='-177390' action='modify' lat='37.55687500825' lon='14.46163408617' />
     35  <node id='-177391' action='modify' lat='37.55685572705' lon='14.46163972709' />
     36  <node id='-177392' action='modify' lat='37.55684029554' lon='14.46165536228' />
     37  <node id='-177393' action='modify' lat='37.55683177013' lon='14.46167789501' />
     38  <node id='-177394' action='modify' lat='37.55683183938' lon='14.46170286238' />
     39  <node id='-177395' action='modify' lat='37.55674469778' lon='14.46135781442'>
     40    <tag k='sel' v='3' />
     41  </node>
     42  <node id='-177396' action='modify' lat='37.55671642158' lon='14.4613866301' />
     43  <node id='-177397' action='modify' lat='37.55673193945' lon='14.46140212871' />
     44  <node id='-177398' action='modify' lat='37.5567512515' lon='14.46140759931' />
     45  <node id='-177399' action='modify' lat='37.55677053272' lon='14.46140195839' />
     46  <node id='-177400' action='modify' lat='37.55678596424' lon='14.4613863232' />
     47  <node id='-177401' action='modify' lat='37.55679448966' lon='14.46136379047'>
     48    <tag k='sel' v='3' />
     49  </node>
     50  <node id='-177402' action='modify' lat='37.55679442042' lon='14.4613388231' />
     51  <node id='-177403' action='modify' lat='37.55678577022' lon='14.46131636618' />
     52  <node id='-177404' action='modify' lat='37.55677025235' lon='14.46130086757' />
     53  <node id='-177405' action='modify' lat='37.55675094031' lon='14.46129539696' />
     54  <node id='-177406' action='modify' lat='37.55673165908' lon='14.46130103789' />
     55  <node id='-177407' action='modify' lat='37.55671622756' lon='14.46131667308' />
     56  <node id='-177408' action='modify' lat='37.55670770212' lon='14.4613392058' />
     57  <node id='-177409' action='modify' lat='37.55670777137' lon='14.46136417318' />
     58  <node id='-177410' action='modify' lat='37.55653956697' lon='14.46209010402' />
     59  <node id='-177411' action='modify' lat='37.55658630124' lon='14.46210554382' />
     60  <node id='-177412' action='modify' lat='37.55665195171' lon='14.46208519136' />
     61  <node id='-177413' action='modify' lat='37.55675376546' lon='14.46201079963' />
     62  <node id='-177414' action='modify' lat='37.55655681414' lon='14.46216660118' />
     63  <node id='-177415' action='modify' lat='37.55660354841' lon='14.46218204098' />
     64  <node id='-177416' action='modify' lat='37.55666919885' lon='14.46216168852'>
     65    <tag k='sel' v='41' />
     66  </node>
     67  <node id='-177417' action='modify' lat='37.55677101258' lon='14.46208729679' />
     68  <node id='-177418' action='modify' lat='37.55683731449' lon='14.46239008267' />
     69  <node id='-177419' action='modify' lat='37.5566402416' lon='14.46279572753' />
     70  <node id='-177420' action='modify' lat='37.55671231689' lon='14.46237870724' />
     71  <node id='-177421' action='modify' lat='37.55671347821' lon='14.46241863738' />
     72  <node id='-177422' action='modify' lat='37.55671081506' lon='14.46245223115' />
     73  <node id='-177423' action='modify' lat='37.55668951053' lon='14.46251269911' />
     74  <node id='-177424' action='modify' lat='37.55666953692' lon='14.46255133196' />
     75  <node id='-177425' action='modify' lat='37.55663624754' lon='14.46258492574' />
     76  <node id='-177426' action='modify' lat='37.5565822772' lon='14.46260879036' />
     77  <node id='-177427' action='modify' lat='37.5568586203' lon='14.46265715236' />
     78  <node id='-177428' action='modify' lat='37.55657189412' lon='14.46236592807' />
     79  <node id='-177429' action='modify' lat='37.55644583135' lon='14.46235648889' />
     80  <node id='-177430' action='modify' lat='37.55644733048' lon='14.46237908049' />
     81  <node id='-177431' action='modify' lat='37.55645381458' lon='14.4624002242' />
     82  <node id='-177432' action='modify' lat='37.55646475836' lon='14.4624182071' />
     83  <node id='-177433' action='modify' lat='37.55647927522' lon='14.4624315723' />
     84  <node id='-177434' action='modify' lat='37.55649618907' lon='14.46243923705' />
     85  <node id='-177435' action='modify' lat='37.55651412967' lon='14.46244058038' />
     86  <node id='-177436' action='modify' lat='37.55652895376' lon='14.46243682061' />
     87  <node id='-177437' action='modify' lat='37.55654731191' lon='14.46242438845' />
     88  <node id='-177438' action='modify' lat='37.55656092621' lon='14.46240612819' />
     89  <node id='-177439' action='modify' lat='37.55656828681' lon='14.46238813732' />
     90  <node id='-177440' action='modify' lat='37.556570395' lon='14.46234333647' />
     91  <node id='-177441' action='modify' lat='37.55656391091' lon='14.46232219276' />
     92  <node id='-177442' action='modify' lat='37.55655296714' lon='14.46230420986' />
     93  <node id='-177443' action='modify' lat='37.5565384503' lon='14.46229084466' />
     94  <node id='-177444' action='modify' lat='37.55652153645' lon='14.46228317991' />
     95  <node id='-177445' action='modify' lat='37.55650359584' lon='14.46228183658' />
     96  <node id='-177446' action='modify' lat='37.55648608194' lon='14.46228692348' />
     97  <node id='-177447' action='modify' lat='37.55647041359' lon='14.46229802851' />
     98  <node id='-177448' action='modify' lat='37.55645786016' lon='14.46231425201' />
     99  <node id='-177449' action='modify' lat='37.55644943867' lon='14.46233427964' />
     100  <node id='-177450' action='modify' lat='37.55677883754' lon='14.46238476096' />
     101  <node id='-177451' action='modify' lat='37.55678338581' lon='14.46246734835' />
     102  <node id='-177452' action='modify' lat='37.55675262917' lon='14.46256661489' />
     103  <node id='-177453' action='modify' lat='37.55671281242' lon='14.46262355942' />
     104  <node id='-177454' action='modify' lat='37.55667952306' lon='14.46265211413' />
     105  <node id='-177455' action='modify' lat='37.55664894294' lon='14.46267308698' />
     106  <node id='-177456' action='modify' lat='37.5566230771' lon='14.46274037141' />
     107  <node id='-177457' action='modify' lat='37.55644192824' lon='14.46154801513' />
     108  <node id='-177458' action='modify' lat='37.55635456852' lon='14.46128700605' />
     109  <node id='-177459' action='modify' lat='37.55646581605' lon='14.46148487984' />
     110  <node id='-177460' action='modify' lat='37.55648104734' lon='14.46176525798' />
     111  <node id='-177461' action='modify' lat='37.55637416104' lon='14.46139356747' />
     112  <node id='-177462' action='modify' lat='37.55648073615' lon='14.46165305563' />
     113  <node id='-177463' action='modify' lat='37.5565285776' lon='14.46152266506' />
     114  <node id='-177464' action='modify' lat='37.55633528719' lon='14.46129264697' />
     115  <node id='-177465' action='modify' lat='37.55643749781' lon='14.46169686447' />
     116  <node id='-177466' action='modify' lat='37.55631139935' lon='14.46135578226' />
     117  <node id='-177467' action='modify' lat='37.55650032863' lon='14.46175961706' />
     118  <node id='-177468' action='modify' lat='37.55650468982' lon='14.46158580035' />
     119  <node id='-177469' action='modify' lat='37.55647885479' lon='14.46154165637'>
     120    <tag k='sel' v='11' />
     121  </node>
     122  <node id='-177470' action='modify' lat='37.55638959263' lon='14.46137793228' />
     123  <node id='-177471' action='modify' lat='37.55652421641' lon='14.46169648177' />
     124  <node id='-177472' action='modify' lat='37.55638939861' lon='14.46130797526' />
     125  <node id='-177473' action='modify' lat='37.55644621729' lon='14.46174428876' />
     126  <node id='-177474' action='modify' lat='37.556441859' lon='14.46152304776' />
     127  <node id='-177475' action='modify' lat='37.55643756705' lon='14.46172183184' />
     128  <node id='-177476' action='modify' lat='37.55648509734' lon='14.46147923892' />
     129  <node id='-177477' action='modify' lat='37.55633556756' lon='14.46139373779' />
     130  <node id='-177478' action='modify' lat='37.55652864684' lon='14.46154763243' />
     131  <node id='-177479' action='modify' lat='37.55651556618' lon='14.46167402484' />
     132  <node id='-177480' action='modify' lat='37.55637388066' lon='14.46129247665' />
     133  <node id='-177481' action='modify' lat='37.55646173522' lon='14.46175978737' />
     134  <node id='-177482' action='modify' lat='37.55651992737' lon='14.46150020813' />
     135  <node id='-177483' action='modify' lat='37.55646145485' lon='14.46165869655' />
     136  <node id='-177484' action='modify' lat='37.55631985558' lon='14.46130828216' />
     137  <node id='-177485' action='modify' lat='37.55648540853' lon='14.46159144127' />
     138  <node id='-177486' action='modify' lat='37.55635487971' lon='14.4613992084' />
     139  <node id='-177487' action='modify' lat='37.55651576021' lon='14.46174398186' />
     140  <node id='-177488' action='modify' lat='37.5563981181' lon='14.46135539956'>
     141    <tag k='sel' v='13' />
     142  </node>
     143  <node id='-177489' action='modify' lat='37.55634832596' lon='14.4613494235'>
     144    <tag k='sel' v='13' />
     145  </node>
     146  <node id='-177490' action='modify' lat='37.55645057848' lon='14.46157047206' />
     147  <node id='-177491' action='modify' lat='37.55645038446' lon='14.46150051503' />
     148  <node id='-177492' action='modify' lat='37.55644602327' lon='14.46167433174' />
     149  <node id='-177493' action='modify' lat='37.55650440945' lon='14.46148470952' />
     150  <node id='-177494' action='modify' lat='37.5563113301' lon='14.46133081489' />
     151  <node id='-177495' action='modify' lat='37.55652428566' lon='14.46172144914' />
     152  <node id='-177496' action='modify' lat='37.55652012139' lon='14.46157016515' />
     153  <node id='-177497' action='modify' lat='37.55639804885' lon='14.46133043219' />
     154  <node id='-177498' action='modify' lat='37.55650004826' lon='14.46165852623' />
     155  <node id='-177499' action='modify' lat='37.55652289699' lon='14.46165441572'>
     156    <tag k='sel' v='12' />
     157  </node>
     158  <node id='-177500' action='modify' lat='37.55646609642' lon='14.46158597066' />
     159  <node id='-177501' action='modify' lat='37.5563200496' lon='14.46137823918' />
     160  <node id='-177502' action='modify' lat='37.5558815644' lon='14.46196208882' />
     161  <node id='-177503' action='modify' lat='37.55599395013' lon='14.46195717616' />
     162  <node id='-177504' action='modify' lat='37.55609576478' lon='14.46188278442' />
     163  <node id='-177505' action='modify' lat='37.55601820525' lon='14.46153058085' />
     164  <node id='-177506' action='modify' lat='37.55603372327' lon='14.46154607946' />
     165  <node id='-177507' action='modify' lat='37.55601801123' lon='14.46146062383' />
     166  <node id='-177508' action='modify' lat='37.5560530355' lon='14.46155155006' />
     167  <node id='-177509' action='modify' lat='37.55608755454' lon='14.46146031692' />
     168  <node id='-177510' action='modify' lat='37.55605272431' lon='14.46143934771' />
     169  <node id='-177511' action='modify' lat='37.5560723169' lon='14.46154590914' />
     170  <node id='-177512' action='modify' lat='37.5560334429' lon='14.46144498863' />
     171  <node id='-177513' action='modify' lat='37.55609620482' lon='14.46148277385' />
     172  <node id='-177514' action='modify' lat='37.55600955497' lon='14.46150812392' />
     173  <node id='-177515' action='modify' lat='37.55607203653' lon='14.46144481831' />
     174  <node id='-177516' action='modify' lat='37.55600948572' lon='14.46148315655' />
     175  <node id='-177517' action='modify' lat='37.55687368078' lon='14.46132837434' />
     176  <node id='-177518' action='modify' lat='37.55688919862' lon='14.46134387295' />
     177  <node id='-177519' action='modify' lat='37.55690851062' lon='14.46134934356' />
     178  <node id='-177520' action='modify' lat='37.55692779181' lon='14.46134370263' />
     179  <node id='-177521' action='modify' lat='37.5569432233' lon='14.46132806744' />
     180  <node id='-177522' action='modify' lat='37.55695174869' lon='14.46130553472' />
     181  <node id='-177523' action='modify' lat='37.55694577554' lon='14.46128304982' />
     182  <node id='-177524' action='modify' lat='37.55694302927' lon='14.46125811042' />
     183  <node id='-177525' action='modify' lat='37.55692751144' lon='14.46124261181' />
     184  <node id='-177526' action='modify' lat='37.55690819943' lon='14.46123714121' />
     185  <node id='-177527' action='modify' lat='37.55688891825' lon='14.46124278213' />
     186  <node id='-177528' action='modify' lat='37.55687348675' lon='14.46125841732' />
     187  <node id='-177529' action='modify' lat='37.55686496134' lon='14.46128095005' />
     188  <node id='-177530' action='modify' lat='37.55686503059' lon='14.46130591742' />
     189  <node id='-177531' action='modify' lat='37.55587222611' lon='14.46211553776' />
     190  <node id='-177532' action='modify' lat='37.555954882' lon='14.46205099363' />
     191  <node id='-177533' action='modify' lat='37.55604737777' lon='14.46209319556' />
     192  <node id='-177534' action='modify' lat='37.55611035355' lon='14.4620013443' />
     193  <node id='-177535' action='modify' lat='37.55611232154' lon='14.46220242409' />
     194  <node id='-177536' action='modify' lat='37.55591158607' lon='14.46251769735' />
     195  <node id='-177537' action='modify' lat='37.55589190609' lon='14.46220490656' />
     196  <node id='-177538' action='modify' lat='37.55613987343' lon='14.46239853895' />
     197  <node id='-177539' action='modify' lat='37.55613003347' lon='14.46261327231' />
     198  <node id='-177540' action='modify' lat='37.55592929804' lon='14.46292854557' />
     199  <node id='-177541' action='modify' lat='37.55590961807' lon='14.46261575478' />
     200  <node id='-177542' action='modify' lat='37.55615758535' lon='14.46280938717' />
     201  <node id='-177543' action='modify' lat='37.55605578204' lon='14.46272989105' />
     202  <node id='-177544' action='modify' lat='37.55582527409' lon='14.4626846841' />
     203  <node id='-177545' action='modify' lat='37.55575467839' lon='14.46279691764' />
     204  <node id='-177546' action='modify' lat='37.55563124764' lon='14.46298919602' />
     205  <node id='-177547' action='modify' lat='37.55560452949' lon='14.46267748134' />
     206  <node id='-177548' action='modify' lat='37.5558614152' lon='14.4628783235' />
     207  <node id='-177549' action='modify' lat='37.55578760212' lon='14.46224090232' />
     208  <node id='-177550' action='modify' lat='37.55558686577' lon='14.46255617558' />
     209  <node id='-177551' action='modify' lat='37.55556718571' lon='14.46224338479' />
     210  <node id='-177552' action='modify' lat='37.55581515413' lon='14.46243701719' />
     211  <node id='-177553' action='modify' lat='37.55644611869' lon='14.46138381242' />
     212  <node id='-177554' action='modify' lat='37.55646163663' lon='14.46139931103' />
     213  <node id='-177555' action='modify' lat='37.55648094875' lon='14.46140478164' />
     214  <node id='-177556' action='modify' lat='37.55650023004' lon='14.46139914071' />
     215  <node id='-177557' action='modify' lat='37.55651566162' lon='14.46138350552' />
     216  <node id='-177558' action='modify' lat='37.55652418706' lon='14.4613609728' />
     217  <node id='-177559' action='modify' lat='37.55651821387' lon='14.46133848789' />
     218  <node id='-177560' action='modify' lat='37.55651546759' lon='14.4613135485' />
     219  <node id='-177561' action='modify' lat='37.55649994967' lon='14.46129804989' />
     220  <node id='-177562' action='modify' lat='37.55648063755' lon='14.46129257929' />
     221  <node id='-177563' action='modify' lat='37.55646135625' lon='14.46129822021' />
     222  <node id='-177564' action='modify' lat='37.55644592466' lon='14.4613138554' />
     223  <node id='-177565' action='modify' lat='37.55643739921' lon='14.46133638813' />
     224  <node id='-177566' action='modify' lat='37.55643746846' lon='14.4613613555' />
     225  <node id='-177567' action='modify' lat='37.556716745' lon='14.46156434474' />
     226  <node id='-177568' action='modify' lat='37.55673226287' lon='14.46157984335' />
     227  <node id='-177569' action='modify' lat='37.55675157492' lon='14.46158531395' />
     228  <node id='-177570' action='modify' lat='37.55677085614' lon='14.46157967303' />
     229  <node id='-177571' action='modify' lat='37.55678628766' lon='14.46156403784' />
     230  <node id='-177572' action='modify' lat='37.55679481308' lon='14.46154150511'>
     231    <tag k='sel' v='4' />
     232  </node>
     233  <node id='-177573' action='modify' lat='37.55679474384' lon='14.46151653774' />
     234  <node id='-177574' action='modify' lat='37.55678012633' lon='14.46150160818' />
     235  <node id='-177575' action='modify' lat='37.55677057577' lon='14.46147858221' />
     236  <node id='-177576' action='modify' lat='37.55675126373' lon='14.4614731116' />
     237  <node id='-177577' action='modify' lat='37.5567319825' lon='14.46147875253' />
     238  <node id='-177578' action='modify' lat='37.55671655098' lon='14.46149438772' />
     239  <node id='-177579' action='modify' lat='37.55670802555' lon='14.46151692044'>
     240    <tag k='sel' v='4' />
     241  </node>
     242  <node id='-177580' action='modify' lat='37.5567080948' lon='14.46154188782' />
     243  <node id='-177581' action='modify' lat='37.55640207453' lon='14.46151110796' />
     244  <node id='-177582' action='modify' lat='37.5563867939' lon='14.46149617839' />
     245  <node id='-177583' action='modify' lat='37.55637790634' lon='14.46147315242' />
     246  <node id='-177584' action='modify' lat='37.55635859419' lon='14.46146768182' />
     247  <node id='-177585' action='modify' lat='37.55633931287' lon='14.46147332274' />
     248  <node id='-177586' action='modify' lat='37.55632388126' lon='14.46148895793' />
     249  <node id='-177587' action='modify' lat='37.55631535579' lon='14.46151149066'>
     250    <tag k='sel' v='14' />
     251  </node>
     252  <node id='-177588' action='modify' lat='37.55637818671' lon='14.46157424325' />
     253  <node id='-177589' action='modify' lat='37.55639361831' lon='14.46155860805' />
     254  <node id='-177590' action='modify' lat='37.55640214377' lon='14.46153607533'>
     255    <tag k='sel' v='14' />
     256  </node>
     257  <node id='-177591' action='modify' lat='37.55631542503' lon='14.46153645803' />
     258  <node id='-177592' action='modify' lat='37.55632407528' lon='14.46155891496' />
     259  <node id='-177593' action='modify' lat='37.55633959324' lon='14.46157441356' />
     260  <node id='-177594' action='modify' lat='37.55635890538' lon='14.46157988417' />
     261  <node id='-177595' action='modify' lat='37.55605448327' lon='14.4613042381'>
     262    <tag k='invalid-selection' v='yes' />
     263    <tag k='sel' v='20' />
     264  </node>
     265  <node id='-177596' action='modify' lat='37.5558489401' lon='14.46128918337' />
     266  <node id='-177597' action='modify' lat='37.55584363576' lon='14.46140293022' />
     267  <node id='-177598' action='modify' lat='37.55578130964' lon='14.4614129667' />
     268  <node id='-177599' action='modify' lat='37.55577335312' lon='14.46129420161' />
     269  <node id='-177600' action='modify' lat='37.55571746794' lon='14.46144177661' />
     270  <node id='-177601' action='modify' lat='37.5555167314' lon='14.46175704987' />
     271  <node id='-177602' action='modify' lat='37.55549705132' lon='14.46144425908' />
     272  <node id='-177603' action='modify' lat='37.55574501997' lon='14.46163789148' />
     273  <node id='-177604' action='modify' lat='37.55575879599' lon='14.4618811732' />
     274  <node id='-177605' action='modify' lat='37.55568454418' lon='14.46199779193' />
     275  <node id='-177606' action='modify' lat='37.55555805956' lon='14.46219644646' />
     276  <node id='-177607' action='modify' lat='37.55553837949' lon='14.46188365567' />
     277  <node id='-177608' action='modify' lat='37.555786348' lon='14.46207728806' />
     278  <node id='-177609' action='modify' lat='37.55675310861' lon='14.46175472442' />
     279  <node id='-177610' action='modify' lat='37.55671827868' lon='14.46173375521' />
     280  <node id='-177611' action='modify' lat='37.55673379656' lon='14.46174925382' />
     281  <node id='-177612' action='modify' lat='37.55678782135' lon='14.46173344831' />
     282  <node id='-177613' action='modify' lat='37.55677238983' lon='14.4617490835' />
     283  <node id='-177614' action='modify' lat='37.55670962848' lon='14.46171129829' />
     284  <node id='-177615' action='modify' lat='37.55679627752' lon='14.46168594821'>
     285    <tag k='sel' v='5' />
     286  </node>
     287  <node id='-177616' action='modify' lat='37.55673351619' lon='14.461648163' />
     288  <node id='-177617' action='modify' lat='37.55679634676' lon='14.46171091558'>
     289    <tag k='sel' v='5' />
     290  </node>
     291  <node id='-177618' action='modify' lat='37.55675279742' lon='14.46164252207' />
     292  <node id='-177619' action='modify' lat='37.55677210946' lon='14.46164799268'>
     293    <tag k='sel' v='5' />
     294  </node>
     295  <node id='-177620' action='modify' lat='37.55670955923' lon='14.46168633091'>
     296    <tag k='sel' v='5' />
     297  </node>
     298  <node id='-177621' action='modify' lat='37.55678166001' lon='14.46167101866' />
     299  <node id='-177622' action='modify' lat='37.55671808466' lon='14.46166379819' />
     300  <node id='-177623' action='modify' lat='37.55635782999' lon='14.46164914107' />
     301  <node id='-177624' action='modify' lat='37.55632311706' lon='14.46167041719' />
     302  <node id='-177625' action='modify' lat='37.55637742251' lon='14.4617557025' />
     303  <node id='-177626' action='modify' lat='37.55633882903' lon='14.46175587282' />
     304  <node id='-177627' action='modify' lat='37.55639285411' lon='14.46174006731' />
     305  <node id='-177628' action='modify' lat='37.55632331108' lon='14.46174037421' />
     306  <node id='-177629' action='modify' lat='37.55640131033' lon='14.46169256721'>
     307    <tag k='sel' v='15' />
     308  </node>
     309  <node id='-177630' action='modify' lat='37.55631466083' lon='14.46171791729' />
     310  <node id='-177631' action='modify' lat='37.55640137957' lon='14.46171753458'>
     311    <tag k='sel' v='15' />
     312  </node>
     313  <node id='-177632' action='modify' lat='37.55638669274' lon='14.46167763766' />
     314  <node id='-177633' action='modify' lat='37.55633854866' lon='14.461654782' />
     315  <node id='-177634' action='modify' lat='37.55631459158' lon='14.46169294991'>
     316    <tag k='sel' v='15' />
     317  </node>
     318  <node id='-177635' action='modify' lat='37.55637714213' lon='14.46165461168'>
     319    <tag k='sel' v='15' />
     320  </node>
     321  <node id='-177636' action='modify' lat='37.55635814118' lon='14.46176134342' />
     322  <node id='-177637' action='modify' lat='37.55660656928' lon='14.46128015712' />
     323  <node id='-177638' action='modify' lat='37.55657229559' lon='14.46130125895' />
     324  <node id='-177639' action='modify' lat='37.55662591633' lon='14.4613853016' />
     325  <node id='-177640' action='modify' lat='37.55658790494' lon='14.4613854776' />
     326  <node id='-177641' action='modify' lat='37.55664112636' lon='14.4613699233' />
     327  <node id='-177642' action='modify' lat='37.55657260581' lon='14.46137024057' />
     328  <node id='-177643' action='modify' lat='37.55664952202' lon='14.46132307658' />
     329  <node id='-177644' action='modify' lat='37.5565640487' lon='14.4613481477' />
     330  <node id='-177645' action='modify' lat='37.55665273282' lon='14.46135042447'>
     331    <tag k='sel' v='7' />
     332  </node>
     333  <node id='-177646' action='modify' lat='37.55664099118' lon='14.46130087148' />
     334  <node id='-177647' action='modify' lat='37.55658751983' lon='14.46128576501' />
     335  <node id='-177648' action='modify' lat='37.55655624194' lon='14.46133124339'>
     336    <tag k='sel' v='7' />
     337  </node>
     338  <node id='-177649' action='modify' lat='37.55662565772' lon='14.46128554989' />
     339  <node id='-177650' action='modify' lat='37.55660692653' lon='14.46139085149' />
     340  <node id='-177651' action='modify' lat='37.55660676548' lon='14.46133550421'>
     341    <tag k='sel' v='7' />
     342  </node>
     343  <node id='-177652' action='modify' lat='37.55590697927' lon='14.46138712673' />
     344  <node id='-177653' action='modify' lat='37.55597507195' lon='14.46131728109' />
     345  <node id='-177654' action='modify' lat='37.55597559287' lon='14.46138630275' />
     346  <node id='-177655' action='modify' lat='37.55598389844' lon='14.46136400694' />
     347  <node id='-177656' action='modify' lat='37.55590645835' lon='14.46131810506' />
     348  <node id='-177657' action='modify' lat='37.55589815277' lon='14.46134040087' />
     349  <node id='-177658' action='modify' lat='37.55594060788' lon='14.46129685283' />
     350  <node id='-177659' action='modify' lat='37.5559216104' lon='14.46130256294' />
     351  <node id='-177660' action='modify' lat='37.55594144336' lon='14.46140755499' />
     352  <node id='-177661' action='modify' lat='37.55595968808' lon='14.46130210567' />
     353  <node id='-177662' action='modify' lat='37.55592236315' lon='14.46140230214' />
     354  <node id='-177663' action='modify' lat='37.55589833868' lon='14.46136503442' />
     355  <node id='-177664' action='modify' lat='37.5559282237' lon='14.46134925932'>
     356    <tag k='invalid-selection' v='yes' />
     357    <tag k='sel' v='28' />
     358  </node>
     359  <node id='-177665' action='modify' lat='37.55596044083' lon='14.46140184487' />
     360  <node id='-177666' action='modify' lat='37.55598371253' lon='14.46133937339' />
     361  <node id='-177667' action='modify' lat='37.55595147095' lon='14.46137426998'>
     362    <tag k='sel' v='28' />
     363  </node>
     364  <node id='-177668' action='modify' lat='37.55599573207' lon='14.46172257931' />
     365  <node id='-177669' action='modify' lat='37.55601125009' lon='14.46173807792' />
     366  <node id='-177670' action='modify' lat='37.55603056233' lon='14.46174354852' />
     367  <node id='-177671' action='modify' lat='37.55604984374' lon='14.4617379076' />
     368  <node id='-177672' action='modify' lat='37.55606527541' lon='14.46172227241' />
     369  <node id='-177673' action='modify' lat='37.5560738009' lon='14.46169973968' />
     370  <node id='-177674' action='modify' lat='37.55607373166' lon='14.46167477231' />
     371  <node id='-177675' action='modify' lat='37.55605911401' lon='14.46165984275' />
     372  <node id='-177676' action='modify' lat='37.55604956336' lon='14.46163681678' />
     373  <node id='-177677' action='modify' lat='37.55603025114' lon='14.46163134617' />
     374  <node id='-177678' action='modify' lat='37.55601096972' lon='14.4616369871' />
     375  <node id='-177679' action='modify' lat='37.55599553805' lon='14.46165262229' />
     376  <node id='-177680' action='modify' lat='37.55598701253' lon='14.46167515501' />
     377  <node id='-177681' action='modify' lat='37.55598708178' lon='14.46170012239' />
     378  <node id='-177682' action='modify' lat='37.55601928253' lon='14.46166005296' />
     379  <node id='-177683' action='modify' lat='37.55605106444' lon='14.46168343898' />
     380  <node id='-177684' action='modify' lat='37.55603305469' lon='14.46171551124' />
     381  <node id='-177685' action='modify' lat='37.55601398554' lon='14.46171751576' />
     382  <node id='-177686' action='modify' lat='37.55658065366' lon='14.4615602573' />
     383  <node id='-177687' action='modify' lat='37.55657200344' lon='14.46153780038' />
     384  <node id='-177688' action='modify' lat='37.55657193419' lon='14.46151283301' />
     385  <node id='-177689' action='modify' lat='37.55658045963' lon='14.46149030028' />
     386  <node id='-177690' action='modify' lat='37.55659589119' lon='14.46147466509' />
     387  <node id='-177691' action='modify' lat='37.55661517245' lon='14.46146902417' />
     388  <node id='-177692' action='modify' lat='37.55663448454' lon='14.46147449477' />
     389  <node id='-177693' action='modify' lat='37.55665000242' lon='14.46148999338' />
     390  <node id='-177694' action='modify' lat='37.5566527487' lon='14.46151493278'>
     391    <tag k='sel' v='8' />
     392  </node>
     393  <node id='-177695' action='modify' lat='37.55665872188' lon='14.46153741768' />
     394  <node id='-177696' action='modify' lat='37.55665019645' lon='14.4615599504' />
     395  <node id='-177697' action='modify' lat='37.55663476491' lon='14.46157558559' />
     396  <node id='-177698' action='modify' lat='37.55661548364' lon='14.46158122652' />
     397  <node id='-177699' action='modify' lat='37.55659617156' lon='14.46157575591' />
     398  <node id='-177757' action='modify' lat='37.55559309613' lon='14.46135720196' />
     399  <node id='-177758' action='modify' lat='37.5555844458' lon='14.46133474504' />
     400  <node id='-177759' action='modify' lat='37.55558437655' lon='14.46130977767' />
     401  <node id='-177760' action='modify' lat='37.5555929021' lon='14.46128724494' />
     402  <node id='-177761' action='modify' lat='37.55560833387' lon='14.46127160975' />
     403  <node id='-177762' action='modify' lat='37.55564692773' lon='14.46127143943' />
     404  <node id='-177763' action='modify' lat='37.55566244582' lon='14.46128693804' />
     405  <node id='-177764' action='modify' lat='37.55566519213' lon='14.46131187744' />
     406  <node id='-177765' action='modify' lat='37.55567116539' lon='14.46133436234' />
     407  <node id='-177766' action='modify' lat='37.55566263985' lon='14.46135689506' />
     408  <node id='-177767' action='modify' lat='37.5556472081' lon='14.46137253025' />
     409  <node id='-177768' action='modify' lat='37.55562792658' lon='14.46137817118' />
     410  <node id='-177769' action='modify' lat='37.55560861424' lon='14.46137270057' />
     411  <node id='-177770' action='modify' lat='37.55554321044' lon='14.46127265293' />
     412  <node id='-177771' action='modify' lat='37.55555329556' lon='14.46134213178' />
     413  <node id='-177772' action='modify' lat='37.55554321044' lon='14.46140573917' />
     414  <node id='-177773' action='modify' lat='37.55553545266' lon='14.46141846065' />
     415  <node id='-177891' action='modify' lat='37.55623396697' lon='14.46128721202'>
     416    <tag k='sel' v='60' />
     417  </node>
     418  <node id='-177892' action='modify' lat='37.55626250254' lon='14.46135120389'>
     419    <tag k='sel' v='60' />
     420  </node>
     421  <node id='-177893' action='modify' lat='37.55621177263' lon='14.46138519958'>
     422    <tag k='sel' v='60' />
     423  </node>
     424  <node id='-177894' action='modify' lat='37.55617610315' lon='14.46131920796'>
     425    <tag k='sel' v='60' />
     426  </node>
     427  <node id='-177970' action='modify' lat='37.5564238688' lon='14.4625896564'>
     428    <tag k='sel' v='44' />
     429  </node>
     430  <node id='-177971' action='modify' lat='37.55643489175' lon='14.46270333722' />
     431  <node id='-177972' action='modify' lat='37.55639122412' lon='14.46266828401' />
     432  <node id='-177973' action='modify' lat='37.5563961531' lon='14.46252422054' />
     433  <node id='-178004' action='modify' lat='37.55650397549' lon='14.46266691123'>
     434    <tag k='sel' v='45' />
     435  </node>
     436  <node id='-178005' action='modify' lat='37.55651499843' lon='14.46278059205'>
     437    <tag k='sel' v='45' />
     438  </node>
     439  <node id='-178006' action='modify' lat='37.55647133085' lon='14.46274553885' />
     440  <node id='-178007' action='modify' lat='37.55647625982' lon='14.46260147538'>
     441    <tag k='sel' v='45' />
     442  </node>
     443  <node id='1111111' version='1' lat='37.55562761538' lon='14.46126596883'>
     444    <tag k='old' v='y' />
     445  </node>
     446  <node id='1111112' version='1' lat='37.55551838554' lon='14.46120023836'>
     447    <tag k='old' v='y' />
     448  </node>
     449  <way id='-136888' action='modify'>
     450    <nd ref='-177366' />
     451    <nd ref='-177368' />
     452    <nd ref='-177369' />
     453    <nd ref='-177370' />
     454    <nd ref='-177371' />
     455    <nd ref='-177372' />
     456    <nd ref='-177373' />
     457    <nd ref='-177365' />
     458    <nd ref='-177374' />
     459    <nd ref='-177375' />
     460    <nd ref='-177376' />
     461    <nd ref='-177377' />
     462    <nd ref='-177378' />
     463    <nd ref='-177379' />
     464    <nd ref='-177366' />
     465    <tag k='sel' v='1' />
     466  </way>
     467  <way id='-136889' action='modify'>
     468    <nd ref='-177381' />
     469    <nd ref='-177382' />
     470    <nd ref='-177383' />
     471    <nd ref='-177384' />
     472    <nd ref='-177385' />
     473    <nd ref='-177386' />
     474    <nd ref='-177387' />
     475    <nd ref='-177388' />
     476    <nd ref='-177389' />
     477    <nd ref='-177390' />
     478    <nd ref='-177391' />
     479    <nd ref='-177392' />
     480    <nd ref='-177393' />
     481    <nd ref='-177394' />
     482    <nd ref='-177381' />
     483    <tag k='sel' v='2' />
     484  </way>
     485  <way id='-136890' action='modify'>
     486    <nd ref='-177396' />
     487    <nd ref='-177397' />
     488    <nd ref='-177398' />
     489    <nd ref='-177399' />
     490    <nd ref='-177400' />
     491    <nd ref='-177401' />
     492    <nd ref='-177402' />
     493    <nd ref='-177403' />
     494    <nd ref='-177404' />
     495    <nd ref='-177405' />
     496    <nd ref='-177406' />
     497    <nd ref='-177407' />
     498    <nd ref='-177408' />
     499    <nd ref='-177409' />
     500    <nd ref='-177396' />
     501    <tag k='sel' v='3' />
     502  </way>
     503  <way id='-136891' action='modify'>
     504    <nd ref='-177410' />
     505    <nd ref='-177411' />
     506    <nd ref='-177412' />
     507    <nd ref='-177413' />
     508    <tag k='sel' v='40' />
     509  </way>
     510  <way id='-136892' action='modify'>
     511    <nd ref='-177414' />
     512    <nd ref='-177415' />
     513    <nd ref='-177416' />
     514    <nd ref='-177417' />
     515    <tag k='sel' v='41' />
     516  </way>
     517  <way id='-136893' action='modify'>
     518    <nd ref='-177419' />
     519    <nd ref='-177456' />
     520    <nd ref='-177426' />
     521    <nd ref='-177436' />
     522  </way>
     523  <way id='-136894' action='modify'>
     524    <nd ref='-177420' />
     525    <nd ref='-177421' />
     526    <nd ref='-177422' />
     527    <nd ref='-177423' />
     528    <nd ref='-177424' />
     529    <nd ref='-177425' />
     530    <nd ref='-177426' />
     531    <tag k='name' v='case1' />
     532    <tag k='sel' v='42' />
     533  </way>
     534  <way id='-136895' action='modify'>
     535    <nd ref='-177438' />
     536    <nd ref='-177423' />
     537    <nd ref='-177452' />
     538    <nd ref='-177427' />
     539  </way>
     540  <way id='-136896' action='modify'>
     541    <nd ref='-177429' />
     542    <nd ref='-177430' />
     543    <nd ref='-177431' />
     544    <nd ref='-177432' />
     545    <nd ref='-177433' />
     546    <nd ref='-177434' />
     547    <nd ref='-177435' />
     548    <nd ref='-177436' />
     549    <nd ref='-177437' />
     550    <nd ref='-177438' />
     551    <nd ref='-177439' />
     552    <nd ref='-177428' />
     553    <nd ref='-177440' />
     554    <nd ref='-177441' />
     555    <nd ref='-177442' />
     556    <nd ref='-177443' />
     557    <nd ref='-177444' />
     558    <nd ref='-177445' />
     559    <nd ref='-177446' />
     560    <nd ref='-177447' />
     561    <nd ref='-177448' />
     562    <nd ref='-177449' />
     563    <nd ref='-177429' />
     564  </way>
     565  <way id='-136897' action='modify'>
     566    <nd ref='-177428' />
     567    <nd ref='-177420' />
     568    <nd ref='-177450' />
     569    <nd ref='-177418' />
     570  </way>
     571  <way id='-136898' action='modify'>
     572    <nd ref='-177450' />
     573    <nd ref='-177451' />
     574    <nd ref='-177452' />
     575    <nd ref='-177453' />
     576    <nd ref='-177454' />
     577    <nd ref='-177455' />
     578    <tag k='sel' v='43' />
     579  </way>
     580  <way id='-136899' action='modify'>
     581    <nd ref='-177465' />
     582    <nd ref='-177475' />
     583    <nd ref='-177473' />
     584    <nd ref='-177481' />
     585    <nd ref='-177460' />
     586    <nd ref='-177467' />
     587    <tag k='sel' v='12' />
     588  </way>
     589  <way id='-136900' action='modify'>
     590    <nd ref='-177474' />
     591    <nd ref='-177457' />
     592    <nd ref='-177490' />
     593    <nd ref='-177500' />
     594    <nd ref='-177485' />
     595    <nd ref='-177468' />
     596    <tag k='sel' v='11' />
     597  </way>
     598  <way id='-136901' action='modify'>
     599    <nd ref='-177494' />
     600    <nd ref='-177466' />
     601    <nd ref='-177501' />
     602    <nd ref='-177477' />
     603    <nd ref='-177486' />
     604    <nd ref='-177461' />
     605    <tag k='sel' v='13' />
     606  </way>
     607  <way id='-136902' action='modify'>
     608    <nd ref='-177463' />
     609    <nd ref='-177482' />
     610    <nd ref='-177493' />
     611    <nd ref='-177476' />
     612    <nd ref='-177459' />
     613    <nd ref='-177491' />
     614    <nd ref='-177474' />
     615    <tag k='sel' v='11' />
     616  </way>
     617  <way id='-136903' action='modify'>
     618    <nd ref='-177471' />
     619    <nd ref='-177479' />
     620    <nd ref='-177498' />
     621    <nd ref='-177462' />
     622    <nd ref='-177483' />
     623    <nd ref='-177492' />
     624    <nd ref='-177465' />
     625    <tag k='sel' v='12' />
     626  </way>
     627  <way id='-136904' action='modify'>
     628    <nd ref='-177497' />
     629    <nd ref='-177472' />
     630    <nd ref='-177480' />
     631    <nd ref='-177458' />
     632    <nd ref='-177464' />
     633    <nd ref='-177484' />
     634    <nd ref='-177494' />
     635    <tag k='sel' v='13' />
     636  </way>
     637  <way id='-136905' action='modify'>
     638    <nd ref='-177502' />
     639    <nd ref='-177503' />
     640    <nd ref='-177504' />
     641    <tag k='invalid-selection' v='yes' />
     642    <tag k='sel' v='25' />
     643  </way>
     644  <way id='-136906' action='modify'>
     645    <nd ref='-177461' />
     646    <nd ref='-177470' />
     647    <nd ref='-177488' />
     648    <nd ref='-177497' />
     649    <tag k='sel' v='13' />
     650  </way>
     651  <way id='-136907' action='modify'>
     652    <nd ref='-177468' />
     653    <nd ref='-177496' />
     654    <nd ref='-177478' />
     655    <nd ref='-177463' />
     656    <tag k='sel' v='11' />
     657  </way>
     658  <way id='-136908' action='modify'>
     659    <nd ref='-177467' />
     660    <nd ref='-177487' />
     661    <nd ref='-177495' />
     662    <nd ref='-177471' />
     663    <tag k='sel' v='12' />
     664  </way>
     665  <way id='-136909' action='modify'>
     666    <nd ref='-177516' />
     667    <nd ref='-177514' />
     668    <nd ref='-177505' />
     669    <nd ref='-177506' />
     670    <nd ref='-177508' />
     671    <nd ref='-177511' />
     672    <tag k='invalid-selection' v='yes' />
     673    <tag k='sel' v='21' />
     674  </way>
     675  <way id='-136910' action='modify'>
     676    <nd ref='-177513' />
     677    <nd ref='-177509' />
     678    <nd ref='-177515' />
     679    <nd ref='-177510' />
     680    <nd ref='-177512' />
     681    <nd ref='-177507' />
     682    <nd ref='-177516' />
     683    <tag k='invalid-selection' v='yes' />
     684    <tag k='sel' v='21' />
     685  </way>
     686  <way id='-136911' action='modify'>
     687    <nd ref='-177517' />
     688    <nd ref='-177530' />
     689    <nd ref='-177529' />
     690    <nd ref='-177528' />
     691    <nd ref='-177527' />
     692    <nd ref='-177526' />
     693    <nd ref='-177525' />
     694    <nd ref='-177524' />
     695    <nd ref='-177523' />
     696    <nd ref='-177522' />
     697    <nd ref='-177521' />
     698    <nd ref='-177520' />
     699    <nd ref='-177519' />
     700    <nd ref='-177518' />
     701    <nd ref='-177517' />
     702    <tag k='sel' v='0' />
     703  </way>
     704  <way id='-136912' action='modify'>
     705    <nd ref='-177531' />
     706    <nd ref='-177532' />
     707    <nd ref='-177533' />
     708    <nd ref='-177534' />
     709    <tag k='invalid-selection' v='yes' />
     710    <tag k='sel' v='31' />
     711  </way>
     712  <way id='-136913' action='modify'>
     713    <nd ref='-177535' />
     714    <nd ref='-177536' />
     715    <nd ref='-177537' />
     716    <nd ref='-177538' />
     717    <tag k='invalid-selection' v='yes' />
     718    <tag k='sel' v='32' />
     719  </way>
     720  <way id='-136914' action='modify'>
     721    <nd ref='-177539' />
     722    <nd ref='-177543' />
     723    <nd ref='-177540' />
     724    <nd ref='-177541' />
     725    <nd ref='-177543' />
     726    <nd ref='-177542' />
     727    <tag k='invalid-selection' v='yes' />
     728    <tag k='sel' v='33' />
     729  </way>
     730  <way id='-136915' action='modify'>
     731    <nd ref='-177544' />
     732    <nd ref='-177545' />
     733    <nd ref='-177546' />
     734    <nd ref='-177547' />
     735    <nd ref='-177545' />
     736    <nd ref='-177548' />
     737    <nd ref='-177544' />
     738    <tag k='invalid-selection' v='yes' />
     739    <tag k='sel' v='35' />
     740  </way>
     741  <way id='-136916' action='modify'>
     742    <nd ref='-177549' />
     743    <nd ref='-177550' />
     744    <nd ref='-177551' />
     745    <nd ref='-177552' />
     746    <nd ref='-177549' />
     747    <tag k='invalid-selection' v='yes' />
     748    <tag k='sel' v='34' />
     749  </way>
     750  <way id='-136917' action='modify'>
     751    <nd ref='-177565' />
     752    <nd ref='-177564' />
     753    <nd ref='-177563' />
     754    <nd ref='-177562' />
     755    <nd ref='-177561' />
     756    <nd ref='-177560' />
     757    <nd ref='-177559' />
     758    <tag k='sel' v='10' />
     759  </way>
     760  <way id='-136918' action='modify'>
     761    <nd ref='-177556' />
     762    <nd ref='-177555' />
     763    <nd ref='-177554' />
     764    <nd ref='-177553' />
     765    <nd ref='-177566' />
     766    <nd ref='-177565' />
     767    <tag k='sel' v='10' />
     768  </way>
     769  <way id='-136919' action='modify'>
     770    <nd ref='-177559' />
     771    <nd ref='-177558' />
     772    <nd ref='-177557' />
     773    <nd ref='-177556' />
     774    <tag k='sel' v='10' />
     775  </way>
     776  <way id='-136920' action='modify'>
     777    <nd ref='-177567' />
     778    <nd ref='-177568' />
     779    <nd ref='-177569' />
     780    <nd ref='-177570' />
     781    <nd ref='-177571' />
     782    <nd ref='-177572' />
     783    <nd ref='-177573' />
     784    <nd ref='-177574' />
     785    <nd ref='-177575' />
     786    <nd ref='-177576' />
     787    <nd ref='-177577' />
     788    <nd ref='-177578' />
     789    <nd ref='-177579' />
     790    <nd ref='-177580' />
     791    <nd ref='-177567' />
     792    <tag k='sel' v='4' />
     793  </way>
     794  <way id='-136921' action='modify'>
     795    <nd ref='-177581' />
     796    <nd ref='-177582' />
     797    <nd ref='-177583' />
     798    <nd ref='-177584' />
     799    <nd ref='-177585' />
     800    <nd ref='-177586' />
     801    <nd ref='-177587' />
     802    <tag k='sel' v='14' />
     803  </way>
     804  <way id='-136922' action='modify'>
     805    <nd ref='-177588' />
     806    <nd ref='-177589' />
     807    <nd ref='-177590' />
     808    <nd ref='-177581' />
     809    <tag k='sel' v='14' />
     810  </way>
     811  <way id='-136923' action='modify'>
     812    <nd ref='-177587' />
     813    <nd ref='-177591' />
     814    <nd ref='-177592' />
     815    <nd ref='-177593' />
     816    <nd ref='-177594' />
     817    <nd ref='-177588' />
     818    <tag k='sel' v='14' />
     819  </way>
     820  <way id='-136924' action='modify'>
     821    <nd ref='-177596' />
     822    <nd ref='-177597' />
     823    <nd ref='-177598' />
     824    <nd ref='-177599' />
     825    <nd ref='-177596' />
     826  </way>
     827  <way id='-136925' action='modify'>
     828    <nd ref='-177603' />
     829    <nd ref='-177600' />
     830    <nd ref='-177601' />
     831    <tag k='invalid-selection' v='yes' />
     832    <tag k='sel' v='36' />
     833  </way>
     834  <way id='-136926' action='modify'>
     835    <nd ref='-177608' />
     836    <nd ref='-177604' />
     837    <nd ref='-177605' />
     838    <nd ref='-177606' />
     839    <tag k='invalid-selection' v='yes' />
     840    <tag k='sel' v='37' />
     841  </way>
     842  <way id='-136927' action='modify'>
     843    <nd ref='-177601' />
     844    <nd ref='-177602' />
     845    <nd ref='-177603' />
     846    <tag k='invalid-selection' v='yes' />
     847    <tag k='sel' v='36' />
     848  </way>
     849  <way id='-136928' action='modify'>
     850    <nd ref='-177606' />
     851    <nd ref='-177607' />
     852    <nd ref='-177605' />
     853    <nd ref='-177608' />
     854    <tag k='invalid-selection' v='yes' />
     855    <tag k='sel' v='37' />
     856  </way>
     857  <way id='-136929' action='modify'>
     858    <nd ref='-177610' />
     859    <nd ref='-177611' />
     860    <nd ref='-177609' />
     861    <nd ref='-177613' />
     862    <nd ref='-177612' />
     863    <nd ref='-177617' />
     864    <nd ref='-177615' />
     865    <nd ref='-177621' />
     866    <nd ref='-177619' />
     867    <nd ref='-177618' />
     868    <nd ref='-177616' />
     869    <nd ref='-177622' />
     870    <nd ref='-177620' />
     871    <nd ref='-177614' />
     872    <nd ref='-177610' />
     873    <tag k='sel' v='5' />
     874  </way>
     875  <way id='-136930' action='modify'>
     876    <nd ref='-177628' />
     877    <nd ref='-177626' />
     878    <nd ref='-177636' />
     879    <nd ref='-177625' />
     880    <nd ref='-177627' />
     881    <nd ref='-177631' />
     882    <nd ref='-177629' />
     883    <nd ref='-177632' />
     884    <nd ref='-177635' />
     885    <nd ref='-177623' />
     886    <nd ref='-177633' />
     887    <nd ref='-177624' />
     888    <nd ref='-177634' />
     889    <nd ref='-177630' />
     890    <nd ref='-177628' />
     891    <tag k='sel' v='15' />
     892  </way>
     893  <way id='-136931' action='modify'>
     894    <nd ref='-177642' />
     895    <nd ref='-177640' />
     896    <nd ref='-177650' />
     897    <nd ref='-177639' />
     898    <nd ref='-177641' />
     899    <nd ref='-177645' />
     900    <nd ref='-177643' />
     901    <nd ref='-177646' />
     902    <nd ref='-177649' />
     903    <nd ref='-177637' />
     904    <nd ref='-177647' />
     905    <nd ref='-177638' />
     906    <nd ref='-177648' />
     907    <nd ref='-177644' />
     908    <nd ref='-177642' />
     909    <tag k='sel' v='7' />
     910  </way>
     911  <way id='-136932' action='modify'>
     912    <nd ref='-177652' />
     913    <nd ref='-177662' />
     914    <nd ref='-177660' />
     915    <nd ref='-177665' />
     916    <nd ref='-177654' />
     917    <nd ref='-177655' />
     918    <nd ref='-177666' />
     919    <nd ref='-177653' />
     920    <nd ref='-177661' />
     921    <nd ref='-177658' />
     922    <nd ref='-177659' />
     923    <nd ref='-177656' />
     924    <nd ref='-177657' />
     925    <nd ref='-177663' />
     926    <nd ref='-177652' />
     927    <tag k='invalid-selection' v='yes' />
     928    <tag k='sel' v='28' />
     929  </way>
     930  <way id='-136933' action='modify'>
     931    <nd ref='-177681' />
     932    <nd ref='-177668' />
     933    <nd ref='-177669' />
     934    <nd ref='-177670' />
     935    <nd ref='-177671' />
     936    <nd ref='-177672' />
     937    <nd ref='-177673' />
     938    <nd ref='-177674' />
     939    <tag k='invalid-selection' v='yes' />
     940    <tag k='sel' v='29' />
     941  </way>
     942  <way id='-136934' action='modify'>
     943    <nd ref='-177682' />
     944    <nd ref='-177683' />
     945    <nd ref='-177684' />
     946    <nd ref='-177685' />
     947    <tag k='invalid-selection' v='yes' />
     948    <tag k='sel' v='29' />
     949  </way>
     950  <way id='-136935' action='modify'>
     951    <nd ref='-177682' />
     952    <nd ref='-177685' />
     953    <tag k='invalid-selection' v='yes' />
     954    <tag k='sel' v='29' />
     955  </way>
     956  <way id='-136936' action='modify'>
     957    <nd ref='-177674' />
     958    <nd ref='-177675' />
     959    <nd ref='-177676' />
     960    <nd ref='-177677' />
     961    <nd ref='-177678' />
     962    <nd ref='-177679' />
     963    <nd ref='-177680' />
     964    <nd ref='-177681' />
     965    <tag k='invalid-selection' v='yes' />
     966    <tag k='sel' v='29' />
     967  </way>
     968  <way id='-136937' action='modify'>
     969    <nd ref='-177686' />
     970    <nd ref='-177687' />
     971    <nd ref='-177688' />
     972    <nd ref='-177689' />
     973    <nd ref='-177690' />
     974    <nd ref='-177691' />
     975    <nd ref='-177692' />
     976    <nd ref='-177693' />
     977    <nd ref='-177694' />
     978    <nd ref='-177695' />
     979    <nd ref='-177696' />
     980    <nd ref='-177697' />
     981    <nd ref='-177698' />
     982    <nd ref='-177699' />
     983    <nd ref='-177686' />
     984    <tag k='sel' v='8' />
     985  </way>
     986  <way id='-136943' action='modify'>
     987    <nd ref='-177757' />
     988    <nd ref='-177758' />
     989    <nd ref='-177759' />
     990    <nd ref='-177760' />
     991    <nd ref='-177761' />
     992    <nd ref='1111111' />
     993    <nd ref='-177762' />
     994    <nd ref='-177763' />
     995    <nd ref='-177764' />
     996    <nd ref='-177765' />
     997    <nd ref='-177766' />
     998    <nd ref='-177767' />
     999    <nd ref='-177768' />
     1000    <nd ref='-177769' />
     1001    <nd ref='-177757' />
     1002    <tag k='invalid-selection' v='yes' />
     1003    <tag k='sel' v='70' />
     1004  </way>
     1005  <way id='-136944' action='modify'>
     1006    <nd ref='1111112' />
     1007    <nd ref='-177770' />
     1008    <nd ref='-177771' />
     1009    <nd ref='-177772' />
     1010    <nd ref='-177773' />
     1011    <tag k='invalid-selection' v='yes' />
     1012    <tag k='sel' v='71' />
     1013  </way>
     1014  <way id='-137024' action='modify'>
     1015    <nd ref='-177971' />
     1016    <nd ref='-177972' />
     1017    <nd ref='-177973' />
     1018    <tag k='sel' v='44' />
     1019  </way>
     1020  <way id='-137059' action='modify'>
     1021    <nd ref='-178005' />
     1022    <nd ref='-178006' />
     1023    <nd ref='-178007' />
     1024    <tag k='sel' v='45' />
     1025  </way>
     1026  <relation id='-99764' action='modify'>
     1027    <member type='way' ref='-136924' role='outer' />
     1028    <tag k='invalid-selection' v='yes' />
     1029    <tag k='natural' v='water' />
     1030    <tag k='sel' v='50' />
     1031    <tag k='type' v='multipolygon' />
     1032  </relation>
     1033</osm>
  • test/data/regress/20041/circle-action.osm

     
     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>
  • test/unit/org/openstreetmap/josm/actions/AlignInCircleActionTest.java

     
    44import static org.junit.jupiter.api.Assertions.assertEquals;
    55import static org.junit.jupiter.api.Assertions.assertNotNull;
    66import static org.junit.jupiter.api.Assertions.assertThrows;
     7import static org.junit.jupiter.api.Assertions.assertTrue;
    78
    89import java.nio.file.Files;
    910import java.nio.file.Paths;
     
    1314import org.junit.jupiter.api.Test;
    1415import org.junit.jupiter.api.extension.RegisterExtension;
    1516import org.openstreetmap.josm.TestUtils;
     17import org.openstreetmap.josm.actions.AlignInCircleAction.InvalidSelection;
    1618import org.openstreetmap.josm.command.Command;
    1719import org.openstreetmap.josm.data.osm.DataSet;
    1820import org.openstreetmap.josm.data.osm.Node;
     21import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1922import org.openstreetmap.josm.data.osm.Way;
    2023import org.openstreetmap.josm.io.OsmReader;
    2124import org.openstreetmap.josm.testutils.JOSMTestRules;
     
    149152        }
    150153    }
    151154
     155    /**
     156     * Various cases of selections in file
     157     * @throws Exception if an error occurs
     158     */
     159    @Test
     160    void testSelectionEvaluation() throws Exception {
     161        DataSet ds = OsmReader.parseDataSet(
     162                Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "alignCircleCases.osm")), null);
     163
     164        for (int i = 0; i < 80; i++) {
     165            final String selVal = Integer.toString(i);
     166            Set<OsmPrimitive> sel = ds.allPrimitives().stream().filter(p -> p.hasTag("sel", selVal))
     167                    .collect(Collectors.toSet());
     168            if (sel.isEmpty())
     169                continue;
     170            ds.setSelected(sel);
     171            boolean selValid = sel.stream().noneMatch(p -> p.hasKey("invalid-selection"));
     172            try {
     173                assertNotNull(AlignInCircleAction.buildCommand(ds), "sel=" + selVal);
     174                assertTrue(selValid, "sel=" + selVal + " should be valid ");
     175            } catch (InvalidSelection e) {
     176                assertTrue(!selValid, "sel=" + selVal + " should be invalid ");
     177            }
     178        }
     179    }
    152180}