Changeset 30574 in osm for applications
- Timestamp:
- 2014-08-07T02:42:46+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/MifReader.java
r30573 r30574 358 358 } 359 359 360 private void startPolyLine() throws IOException { 361 polyline = new Way(); 362 ds.addPrimitive(polyline); 363 readAttributes(polyline); 364 state = State.READING_POINTS; 365 } 366 360 367 private void parsePLine(String[] words) throws IOException { 361 if (words.length > 2) {368 if (words.length <= 1 || "MULTIPLE".equalsIgnoreCase(words[1])) { 362 369 // TODO: pline with multiple sections 363 polyline = new Way();364 ds.addPrimitive(polyline);365 readAttributes(polyline);366 numpts = Integer.parseInt(words[1]); // Not described in PDF but found in real files: PLINE XX, with XX = numpoints367 state = State.READING_POINTS;368 } else {369 370 numpts = -1; 370 371 state = State.START_POLYLINE; 372 } else { 373 numpts = Integer.parseInt(words[1]); // Not described in PDF but found in real files: PLINE XX, with XX = numpoints 374 startPolyLine(); 371 375 } 372 376 } … … 458 462 } else if (state == State.START_POLYLINE) { 459 463 numpts = Integer.parseInt(words[0]); 460 polyline = new Way(); 461 ds.addPrimitive(polyline); 462 readAttributes(polyline); 463 state = State.READING_POINTS; 464 startPolyLine(); 464 465 465 466 } else if (state == State.READING_POINTS && numpts > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.