Ignore:
Timestamp:
2020-04-15T22:40:32+02:00 (5 years ago)
Author:
simon04
Message:

fix #19041 - GeoJSONReader: reuse node on same at same position to

Avoids multiple nodes on top of each other. Avoid creating unconnected polygons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/GeoJSONReaderTest.java

    r15865 r16311  
    4646                .doParseDataSet(in, null)
    4747                .getPrimitives(it -> true));
    48             assertEquals(21, primitives.size());
     48            assertEquals(20, primitives.size());
    4949
    5050            final Node node1 = new Node(new LatLon(0.5, 102.0));
     
    5656
    5757            final Way way1 = new Way();
    58             way1.addNode(new Node(new LatLon(0, 102)));
     58            way1.addNode(new Node(new LatLon(0.5, 102.0)));
    5959            way1.addNode(new Node(new LatLon(1, 103)));
    6060            way1.addNode(new Node(new LatLon(0, 104)));
     
    6666            assertEquals("valueB", foundWay1.get().get("propB"));
    6767            assertEquals("0.0", foundWay1.get().get("propB2"));
     68            assertEquals(foundNode1.get(), ((Way) foundWay1.get()).firstNode());
     69            assertEquals("valueA", ((Way) foundWay1.get()).firstNode().get("propA"));
    6870
    6971            final Way way2 = new Way();
Note: See TracChangeset for help on using the changeset viewer.