Package org.openstreetmap.josm.data.osm

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


    @Test
    public void testBuilding() throws Exception {
        final Way w = new Way();
        final Node n1 = new Node();
        w.addNode(n1);
        w.addNode(new Node());
        w.addNode(new Node());
        assertTrue("unclosed way should not match building preset", !getMatchingPresetNames("building", w).contains("Building"));
        w.addNode(n1);
        assertTrue("closed way should match building preset", getMatchingPresetNames("building", w).contains("Building"));
View Full Code Here


    @Test
    public void testBuilding() throws Exception {
        final Way w = new Way();
        final Node n1 = new Node();
        w.addNode(n1);
        w.addNode(new Node());
        w.addNode(new Node());
        assertTrue("unclosed way should not match building preset", !getMatchingPresetNames("building", w).contains("Building"));
        w.addNode(n1);
        assertTrue("closed way should match building preset", getMatchingPresetNames("building", w).contains("Building"));
    }
View Full Code Here

    public void testBuilding() throws Exception {
        final Way w = new Way();
        final Node n1 = new Node();
        w.addNode(n1);
        w.addNode(new Node());
        w.addNode(new Node());
        assertTrue("unclosed way should not match building preset", !getMatchingPresetNames("building", w).contains("Building"));
        w.addNode(n1);
        assertTrue("closed way should match building preset", getMatchingPresetNames("building", w).contains("Building"));
    }
View Full Code Here

        final Node n1 = new Node();
        w.addNode(n1);
        w.addNode(new Node());
        w.addNode(new Node());
        assertTrue("unclosed way should not match building preset", !getMatchingPresetNames("building", w).contains("Building"));
        w.addNode(n1);
        assertTrue("closed way should match building preset", getMatchingPresetNames("building", w).contains("Building"));
    }

    @Test
    public void testRelationsForTram() {
View Full Code Here

        dialog.setSize(600,600);
    }

    protected void populate() {
        Way w1 = new Way(1);
        w1.addNode(new Node(10));
        w1.addNode(new Node(11));

        Way w2 = new Way(1);
        w2.addNode(new Node(10));
        w2.addNode(new Node(11));
View Full Code Here

    }

    protected void populate() {
        Way w1 = new Way(1);
        w1.addNode(new Node(10));
        w1.addNode(new Node(11));

        Way w2 = new Way(1);
        w2.addNode(new Node(10));
        w2.addNode(new Node(11));
View Full Code Here

        Way w1 = new Way(1);
        w1.addNode(new Node(10));
        w1.addNode(new Node(11));

        Way w2 = new Way(1);
        w2.addNode(new Node(10));
        w2.addNode(new Node(11));

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

        w1.addNode(new Node(10));
        w1.addNode(new Node(11));

        Way w2 = new Way(1);
        w2.addNode(new Node(10));
        w2.addNode(new Node(11));

        dialog.getConflictResolver().populate(new Conflict<OsmPrimitive>(w1, w2));
    }

    public void showDialog() {
View Full Code Here

    private NodeListMerger nodeListMerger;

    protected void populate() {
        Way w1 = new Way();
        Node n1;
        w1.addNode(n1 = new Node(1));
        for (int i=0; i < 20; i++) {
            n1.put("key" + i, "value" + i);
        }
        StringBuilder note = new StringBuilder();
        for (int i=0; i < 50; i++) {
View Full Code Here

        StringBuilder note = new StringBuilder();
        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));
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.