Changeset 34997 in osm for applications/editors/josm/plugins/opendata
- Timestamp:
- 2019-05-05T20:27:25+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 5 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java
r34911 r34997 155 155 Geometry g = gc.getGeometryN(i); 156 156 if (g instanceof Polygon) { 157 // TODO: Split this section between Polygon and MultiPolygon. 157 158 Relation r = (Relation) op; 158 159 Polygon p = (Polygon) g; … … 170 171 } 171 172 } 173 op = r != null ? r : w; 172 174 } else if (g instanceof LineString) { 173 175 op = createOrGetWay((LineString) g); -
applications/editors/josm/plugins/opendata/test/unit/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReaderTest.java
r34911 r34997 104 104 } 105 105 } 106 107 /** 108 * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/17529">#17529</a> 109 * @throws Exception if an error occurs during reading 110 */ 111 @Test 112 public void testTicket17529() throws Exception { 113 // There is only 1 feature in this data set. 114 File file = new File(TestUtils.getRegressionDataFile(17529, "west_webmerc.shp")); 115 try (InputStream is = new FileInputStream(file)) { 116 Collection<Way> ways = ShpReader.parseDataSet(is, file, null, null).getWays(); 117 assertFalse(ways.isEmpty()); 118 Way way = ways.iterator().next(); 119 assertEquals("Westminster city", way.get("NAMELSAD")); 120 } 121 } 106 122 }
Note:
See TracChangeset
for help on using the changeset viewer.