Package org.openstreetmap.josm.data.osm

Examples of org.openstreetmap.josm.data.osm.Way.addNode()


        for (int i=0; i < 50; i++) {
            note.append(" A very long text ");
        }
        n1.put("note", note.toString());
        w1.addNode(new Node(2));
        w1.addNode(new Node(3));

        Way w2 = new Way();
        w2.addNode(new Node(4));
        w2.addNode(new Node(5));
        w2.addNode(new Node(6));
View Full Code Here


        n1.put("note", note.toString());
        w1.addNode(new Node(2));
        w1.addNode(new Node(3));

        Way w2 = new Way();
        w2.addNode(new Node(4));
        w2.addNode(new Node(5));
        w2.addNode(new Node(6));

        nodeListMerger.populate(new Conflict<OsmPrimitive>(w1, w2));
View Full Code Here

        w1.addNode(new Node(2));
        w1.addNode(new Node(3));

        Way w2 = new Way();
        w2.addNode(new Node(4));
        w2.addNode(new Node(5));
        w2.addNode(new Node(6));

        nodeListMerger.populate(new Conflict<OsmPrimitive>(w1, w2));

    }
View Full Code Here

        w1.addNode(new Node(3));

        Way w2 = new Way();
        w2.addNode(new Node(4));
        w2.addNode(new Node(5));
        w2.addNode(new Node(6));

        nodeListMerger.populate(new Conflict<OsmPrimitive>(w1, w2));

    }
View Full Code Here

    }

    protected void populateLong() {
        Way w1 = new Way();
        for (int i = 0; i < 100; i++) {
            w1.addNode(new Node(i));
        }

        Way w2 = new Way();
        for (int i = 1; i < 200; i+=2) {
            w2.addNode(new Node(i));
View Full Code Here

            w1.addNode(new Node(i));
        }

        Way w2 = new Way();
        for (int i = 1; i < 200; i+=2) {
            w2.addNode(new Node(i));
        }
        nodeListMerger.populate(new Conflict<OsmPrimitive>(w1, w2));

    }
View Full Code Here

            int numNodesInWay = 2 + (int)Math.round(Math.random() * 5);
            int start = (int)Math.round(Math.random() * numNodes);
            for (int j = 0; j < numNodesInWay;j++) {
                int idx = (start + j) % numNodes;
                Node n = nodes.get(idx);
                w.addNode(n);
            }
            w.put("name", "way-"+i);
            ds.addPrimitive(w);
            ways.add(w);
        }
View Full Code Here

    protected static void populateTestDataSetWithWays(DataSet ds) {
        for (int i=0;i<20;i++) {
            Way w = new Way();
            for (int j = 0; j < 10;j++) {
                w.addNode(lookupNode(ds, i+j));
            }
            w.put("name", "way-"+i);
            ds.addPrimitive(w);
        }
    }
View Full Code Here

    public void testOneWay() {
        DataSet source = new DataSet();
        Node n1 = new Node(1);
        Node n2 = new Node(2);
        Way w1 = new Way(3, 1);
        w1.addNode(n1);
        w1.addNode(n2);
        source.addPrimitive(n1);
        source.addPrimitive(n2);
        source.addPrimitive(w1);
        source.setSelected(w1);
View Full Code Here

        DataSet source = new DataSet();
        Node n1 = new Node(1);
        Node n2 = new Node(2);
        Way w1 = new Way(3, 1);
        w1.addNode(n1);
        w1.addNode(n2);
        source.addPrimitive(n1);
        source.addPrimitive(n2);
        source.addPrimitive(w1);
        source.setSelected(w1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.