source: josm/trunk/src/org/openstreetmap/josm/io/OsmReader.java@ 12119

Last change on this file since 12119 was 12087, checked in by Don-vip, 7 years ago

fix #14754 - avoid silent failure with invalid lat/lon coordinates in .osm file

  • Property svn:eol-style set to native
File size: 26.0 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.io;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.io.IOException;
7import java.io.InputStream;
8import java.io.InputStreamReader;
9import java.text.MessageFormat;
10import java.util.ArrayList;
11import java.util.Collection;
12import java.util.List;
13import java.util.Objects;
14import java.util.regex.Matcher;
15import java.util.regex.Pattern;
16
17import javax.xml.stream.Location;
18import javax.xml.stream.XMLInputFactory;
19import javax.xml.stream.XMLStreamConstants;
20import javax.xml.stream.XMLStreamException;
21import javax.xml.stream.XMLStreamReader;
22
23import org.openstreetmap.josm.Main;
24import org.openstreetmap.josm.data.Bounds;
25import org.openstreetmap.josm.data.DataSource;
26import org.openstreetmap.josm.data.coor.LatLon;
27import org.openstreetmap.josm.data.osm.AbstractPrimitive;
28import org.openstreetmap.josm.data.osm.Changeset;
29import org.openstreetmap.josm.data.osm.DataSet;
30import org.openstreetmap.josm.data.osm.DataSet.UploadPolicy;
31import org.openstreetmap.josm.data.osm.Node;
32import org.openstreetmap.josm.data.osm.NodeData;
33import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
34import org.openstreetmap.josm.data.osm.PrimitiveData;
35import org.openstreetmap.josm.data.osm.Relation;
36import org.openstreetmap.josm.data.osm.RelationData;
37import org.openstreetmap.josm.data.osm.RelationMemberData;
38import org.openstreetmap.josm.data.osm.Tagged;
39import org.openstreetmap.josm.data.osm.User;
40import org.openstreetmap.josm.data.osm.Way;
41import org.openstreetmap.josm.data.osm.WayData;
42import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
43import org.openstreetmap.josm.gui.progress.ProgressMonitor;
44import org.openstreetmap.josm.tools.CheckParameterUtil;
45import org.openstreetmap.josm.tools.Utils;
46import org.openstreetmap.josm.tools.date.DateUtils;
47
48/**
49 * Parser for the Osm Api. Read from an input stream and construct a dataset out of it.
50 *
51 * For each xml element, there is a dedicated method.
52 * The XMLStreamReader cursor points to the start of the element, when the method is
53 * entered, and it must point to the end of the same element, when it is exited.
54 */
55public class OsmReader extends AbstractReader {
56
57 protected XMLStreamReader parser;
58
59 protected boolean cancel;
60
61 /** Used by plugins to register themselves as data postprocessors. */
62 private static volatile List<OsmServerReadPostprocessor> postprocessors;
63
64 /** Register a new postprocessor.
65 * @param pp postprocessor
66 * @see #deregisterPostprocessor
67 */
68 public static void registerPostprocessor(OsmServerReadPostprocessor pp) {
69 if (postprocessors == null) {
70 postprocessors = new ArrayList<>();
71 }
72 postprocessors.add(pp);
73 }
74
75 /**
76 * Deregister a postprocessor previously registered with {@link #registerPostprocessor}.
77 * @param pp postprocessor
78 * @see #registerPostprocessor
79 */
80 public static void deregisterPostprocessor(OsmServerReadPostprocessor pp) {
81 if (postprocessors != null) {
82 postprocessors.remove(pp);
83 }
84 }
85
86 /**
87 * constructor (for private and subclasses use only)
88 *
89 * @see #parseDataSet(InputStream, ProgressMonitor)
90 */
91 protected OsmReader() {
92 // Restricts visibility
93 }
94
95 protected void setParser(XMLStreamReader parser) {
96 this.parser = parser;
97 }
98
99 protected void throwException(String msg, Throwable th) throws XMLStreamException {
100 throw new XmlStreamParsingException(msg, parser.getLocation(), th);
101 }
102
103 protected void throwException(String msg) throws XMLStreamException {
104 throw new XmlStreamParsingException(msg, parser.getLocation());
105 }
106
107 protected void parse() throws XMLStreamException {
108 int event = parser.getEventType();
109 while (true) {
110 if (event == XMLStreamConstants.START_ELEMENT) {
111 parseRoot();
112 } else if (event == XMLStreamConstants.END_ELEMENT)
113 return;
114 if (parser.hasNext()) {
115 event = parser.next();
116 } else {
117 break;
118 }
119 }
120 parser.close();
121 }
122
123 protected void parseRoot() throws XMLStreamException {
124 if ("osm".equals(parser.getLocalName())) {
125 parseOsm();
126 } else {
127 parseUnknown();
128 }
129 }
130
131 private void parseOsm() throws XMLStreamException {
132 String v = parser.getAttributeValue(null, "version");
133 if (v == null) {
134 throwException(tr("Missing mandatory attribute ''{0}''.", "version"));
135 }
136 if (!"0.6".equals(v)) {
137 throwException(tr("Unsupported version: {0}", v));
138 }
139 ds.setVersion(v);
140 String upload = parser.getAttributeValue(null, "upload");
141 if (upload != null) {
142 for (UploadPolicy policy : UploadPolicy.values()) {
143 if (policy.getXmlFlag().equalsIgnoreCase(upload)) {
144 ds.setUploadPolicy(policy);
145 break;
146 }
147 }
148 }
149 String generator = parser.getAttributeValue(null, "generator");
150 Long uploadChangesetId = null;
151 if (parser.getAttributeValue(null, "upload-changeset") != null) {
152 uploadChangesetId = getLong("upload-changeset");
153 }
154 while (true) {
155 int event = parser.next();
156
157 if (cancel) {
158 cancel = false;
159 throw new OsmParsingCanceledException(tr("Reading was canceled"), parser.getLocation());
160 }
161
162 if (event == XMLStreamConstants.START_ELEMENT) {
163 switch (parser.getLocalName()) {
164 case "bounds":
165 parseBounds(generator);
166 break;
167 case "node":
168 parseNode();
169 break;
170 case "way":
171 parseWay();
172 break;
173 case "relation":
174 parseRelation();
175 break;
176 case "changeset":
177 parseChangeset(uploadChangesetId);
178 break;
179 default:
180 parseUnknown();
181 }
182 } else if (event == XMLStreamConstants.END_ELEMENT)
183 return;
184 }
185 }
186
187 private void parseBounds(String generator) throws XMLStreamException {
188 String minlon = parser.getAttributeValue(null, "minlon");
189 String minlat = parser.getAttributeValue(null, "minlat");
190 String maxlon = parser.getAttributeValue(null, "maxlon");
191 String maxlat = parser.getAttributeValue(null, "maxlat");
192 String origin = parser.getAttributeValue(null, "origin");
193 if (minlon != null && maxlon != null && minlat != null && maxlat != null) {
194 if (origin == null) {
195 origin = generator;
196 }
197 Bounds bounds = new Bounds(
198 Double.parseDouble(minlat), Double.parseDouble(minlon),
199 Double.parseDouble(maxlat), Double.parseDouble(maxlon));
200 if (bounds.isOutOfTheWorld()) {
201 Bounds copy = new Bounds(bounds);
202 bounds.normalize();
203 Main.info("Bbox " + copy + " is out of the world, normalized to " + bounds);
204 }
205 DataSource src = new DataSource(bounds, origin);
206 ds.addDataSource(src);
207 } else {
208 throwException(tr("Missing mandatory attributes on element ''bounds''. " +
209 "Got minlon=''{0}'',minlat=''{1}'',maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.",
210 minlon, minlat, maxlon, maxlat, origin
211 ));
212 }
213 jumpToEnd();
214 }
215
216 protected Node parseNode() throws XMLStreamException {
217 NodeData nd = new NodeData();
218 String lat = parser.getAttributeValue(null, "lat");
219 String lon = parser.getAttributeValue(null, "lon");
220 LatLon ll = null;
221 if (lat != null && lon != null) {
222 ll = new LatLon(Double.parseDouble(lat), Double.parseDouble(lon));
223 nd.setCoor(ll);
224 }
225 readCommon(nd);
226 if (ll != null && !ll.isValid()) {
227 throwException(tr("Illegal value for attributes ''lat'', ''lon'' on node with ID {0}. Got ''{1}'', ''{2}''.",
228 Long.toString(nd.getId()), lat, lon));
229 }
230 Node n = new Node(nd.getId(), nd.getVersion());
231 n.setVisible(nd.isVisible());
232 n.load(nd);
233 externalIdMap.put(nd.getPrimitiveId(), n);
234 while (true) {
235 int event = parser.next();
236 if (event == XMLStreamConstants.START_ELEMENT) {
237 if ("tag".equals(parser.getLocalName())) {
238 parseTag(n);
239 } else {
240 parseUnknown();
241 }
242 } else if (event == XMLStreamConstants.END_ELEMENT)
243 return n;
244 }
245 }
246
247 protected Way parseWay() throws XMLStreamException {
248 WayData wd = new WayData();
249 readCommon(wd);
250 Way w = new Way(wd.getId(), wd.getVersion());
251 w.setVisible(wd.isVisible());
252 w.load(wd);
253 externalIdMap.put(wd.getPrimitiveId(), w);
254
255 Collection<Long> nodeIds = new ArrayList<>();
256 while (true) {
257 int event = parser.next();
258 if (event == XMLStreamConstants.START_ELEMENT) {
259 switch (parser.getLocalName()) {
260 case "nd":
261 nodeIds.add(parseWayNode(w));
262 break;
263 case "tag":
264 parseTag(w);
265 break;
266 default:
267 parseUnknown();
268 }
269 } else if (event == XMLStreamConstants.END_ELEMENT) {
270 break;
271 }
272 }
273 if (w.isDeleted() && !nodeIds.isEmpty()) {
274 Main.info(tr("Deleted way {0} contains nodes", w.getUniqueId()));
275 nodeIds = new ArrayList<>();
276 }
277 ways.put(wd.getUniqueId(), nodeIds);
278 return w;
279 }
280
281 private long parseWayNode(Way w) throws XMLStreamException {
282 if (parser.getAttributeValue(null, "ref") == null) {
283 throwException(
284 tr("Missing mandatory attribute ''{0}'' on <nd> of way {1}.", "ref", w.getUniqueId())
285 );
286 }
287 long id = getLong("ref");
288 if (id == 0) {
289 throwException(
290 tr("Illegal value of attribute ''ref'' of element <nd>. Got {0}.", id)
291 );
292 }
293 jumpToEnd();
294 return id;
295 }
296
297 protected Relation parseRelation() throws XMLStreamException {
298 RelationData rd = new RelationData();
299 readCommon(rd);
300 Relation r = new Relation(rd.getId(), rd.getVersion());
301 r.setVisible(rd.isVisible());
302 r.load(rd);
303 externalIdMap.put(rd.getPrimitiveId(), r);
304
305 Collection<RelationMemberData> members = new ArrayList<>();
306 while (true) {
307 int event = parser.next();
308 if (event == XMLStreamConstants.START_ELEMENT) {
309 switch (parser.getLocalName()) {
310 case "member":
311 members.add(parseRelationMember(r));
312 break;
313 case "tag":
314 parseTag(r);
315 break;
316 default:
317 parseUnknown();
318 }
319 } else if (event == XMLStreamConstants.END_ELEMENT) {
320 break;
321 }
322 }
323 if (r.isDeleted() && !members.isEmpty()) {
324 Main.info(tr("Deleted relation {0} contains members", r.getUniqueId()));
325 members = new ArrayList<>();
326 }
327 relations.put(rd.getUniqueId(), members);
328 return r;
329 }
330
331 private RelationMemberData parseRelationMember(Relation r) throws XMLStreamException {
332 OsmPrimitiveType type = null;
333 long id = 0;
334 String value = parser.getAttributeValue(null, "ref");
335 if (value == null) {
336 throwException(tr("Missing attribute ''ref'' on member in relation {0}.", r.getUniqueId()));
337 }
338 try {
339 id = Long.parseLong(value);
340 } catch (NumberFormatException e) {
341 throwException(tr("Illegal value for attribute ''ref'' on member in relation {0}. Got {1}", Long.toString(r.getUniqueId()),
342 value), e);
343 }
344 value = parser.getAttributeValue(null, "type");
345 if (value == null) {
346 throwException(tr("Missing attribute ''type'' on member {0} in relation {1}.", Long.toString(id), Long.toString(r.getUniqueId())));
347 }
348 try {
349 type = OsmPrimitiveType.fromApiTypeName(value);
350 } catch (IllegalArgumentException e) {
351 throwException(tr("Illegal value for attribute ''type'' on member {0} in relation {1}. Got {2}.",
352 Long.toString(id), Long.toString(r.getUniqueId()), value), e);
353 }
354 String role = parser.getAttributeValue(null, "role");
355
356 if (id == 0) {
357 throwException(tr("Incomplete <member> specification with ref=0"));
358 }
359 jumpToEnd();
360 return new RelationMemberData(role, type, id);
361 }
362
363 private void parseChangeset(Long uploadChangesetId) throws XMLStreamException {
364
365 Long id = null;
366 if (parser.getAttributeValue(null, "id") != null) {
367 id = getLong("id");
368 }
369 // Read changeset info if neither upload-changeset nor id are set, or if they are both set to the same value
370 if (Objects.equals(id, uploadChangesetId)) {
371 uploadChangeset = new Changeset(id != null ? id.intValue() : 0);
372 while (true) {
373 int event = parser.next();
374 if (event == XMLStreamConstants.START_ELEMENT) {
375 if ("tag".equals(parser.getLocalName())) {
376 parseTag(uploadChangeset);
377 } else {
378 parseUnknown();
379 }
380 } else if (event == XMLStreamConstants.END_ELEMENT)
381 return;
382 }
383 } else {
384 jumpToEnd(false);
385 }
386 }
387
388 private void parseTag(Tagged t) throws XMLStreamException {
389 String key = parser.getAttributeValue(null, "k");
390 String value = parser.getAttributeValue(null, "v");
391 if (key == null || value == null) {
392 throwException(tr("Missing key or value attribute in tag."));
393 } else if (Utils.isStripEmpty(key) && t instanceof AbstractPrimitive) {
394 // #14199: Empty keys as ignored by AbstractPrimitive#put, but it causes problems to fix existing data
395 // Drop the tag on import, but flag the primitive as modified
396 ((AbstractPrimitive) t).setModified(true);
397 } else {
398 t.put(key.intern(), value.intern());
399 }
400 jumpToEnd();
401 }
402
403 protected void parseUnknown(boolean printWarning) throws XMLStreamException {
404 final String element = parser.getLocalName();
405 if (printWarning && ("note".equals(element) || "meta".equals(element))) {
406 // we know that Overpass API returns those elements
407 Main.debug(tr("Undefined element ''{0}'' found in input stream. Skipping.", element));
408 } else if (printWarning) {
409 Main.info(tr("Undefined element ''{0}'' found in input stream. Skipping.", element));
410 }
411 while (true) {
412 int event = parser.next();
413 if (event == XMLStreamConstants.START_ELEMENT) {
414 parseUnknown(false); /* no more warning for inner elements */
415 } else if (event == XMLStreamConstants.END_ELEMENT)
416 return;
417 }
418 }
419
420 protected void parseUnknown() throws XMLStreamException {
421 parseUnknown(true);
422 }
423
424 /**
425 * When cursor is at the start of an element, moves it to the end tag of that element.
426 * Nested content is skipped.
427 *
428 * This is basically the same code as parseUnknown(), except for the warnings, which
429 * are displayed for inner elements and not at top level.
430 * @param printWarning if {@code true}, a warning message will be printed if an unknown element is met
431 * @throws XMLStreamException if there is an error processing the underlying XML source
432 */
433 private void jumpToEnd(boolean printWarning) throws XMLStreamException {
434 while (true) {
435 int event = parser.next();
436 if (event == XMLStreamConstants.START_ELEMENT) {
437 parseUnknown(printWarning);
438 } else if (event == XMLStreamConstants.END_ELEMENT)
439 return;
440 }
441 }
442
443 private void jumpToEnd() throws XMLStreamException {
444 jumpToEnd(true);
445 }
446
447 private User createUser(String uid, String name) throws XMLStreamException {
448 if (uid == null) {
449 if (name == null)
450 return null;
451 return User.createLocalUser(name);
452 }
453 try {
454 long id = Long.parseLong(uid);
455 return User.createOsmUser(id, name);
456 } catch (NumberFormatException e) {
457 throwException(MessageFormat.format("Illegal value for attribute ''uid''. Got ''{0}''.", uid), e);
458 }
459 return null;
460 }
461
462 /**
463 * Read out the common attributes and put them into current OsmPrimitive.
464 * @param current primitive to update
465 * @throws XMLStreamException if there is an error processing the underlying XML source
466 */
467 private void readCommon(PrimitiveData current) throws XMLStreamException {
468 current.setId(getLong("id"));
469 if (current.getUniqueId() == 0) {
470 throwException(tr("Illegal object with ID=0."));
471 }
472
473 String time = parser.getAttributeValue(null, "timestamp");
474 if (time != null && !time.isEmpty()) {
475 current.setRawTimestamp((int) (DateUtils.tsFromString(time)/1000));
476 }
477
478 String user = parser.getAttributeValue(null, "user");
479 String uid = parser.getAttributeValue(null, "uid");
480 current.setUser(createUser(uid, user));
481
482 String visible = parser.getAttributeValue(null, "visible");
483 if (visible != null) {
484 current.setVisible(Boolean.parseBoolean(visible));
485 }
486
487 String versionString = parser.getAttributeValue(null, "version");
488 int version = 0;
489 if (versionString != null) {
490 try {
491 version = Integer.parseInt(versionString);
492 } catch (NumberFormatException e) {
493 throwException(tr("Illegal value for attribute ''version'' on OSM primitive with ID {0}. Got {1}.",
494 Long.toString(current.getUniqueId()), versionString), e);
495 }
496 switch (ds.getVersion()) {
497 case "0.6":
498 if (version <= 0 && !current.isNew()) {
499 throwException(tr("Illegal value for attribute ''version'' on OSM primitive with ID {0}. Got {1}.",
500 Long.toString(current.getUniqueId()), versionString));
501 } else if (version < 0 && current.isNew()) {
502 Main.warn(tr("Normalizing value of attribute ''version'' of element {0} to {2}, API version is ''{3}''. Got {1}.",
503 current.getUniqueId(), version, 0, "0.6"));
504 version = 0;
505 }
506 break;
507 default:
508 // should not happen. API version has been checked before
509 throwException(tr("Unknown or unsupported API version. Got {0}.", ds.getVersion()));
510 }
511 } else {
512 // version expected for OSM primitives with an id assigned by the server (id > 0), since API 0.6
513 if (!current.isNew() && ds.getVersion() != null && "0.6".equals(ds.getVersion())) {
514 throwException(tr("Missing attribute ''version'' on OSM primitive with ID {0}.", Long.toString(current.getUniqueId())));
515 }
516 }
517 current.setVersion(version);
518
519 String action = parser.getAttributeValue(null, "action");
520 if (action == null) {
521 // do nothing
522 } else if ("delete".equals(action)) {
523 current.setDeleted(true);
524 current.setModified(current.isVisible());
525 } else if ("modify".equals(action)) {
526 current.setModified(true);
527 }
528
529 String v = parser.getAttributeValue(null, "changeset");
530 if (v == null) {
531 current.setChangesetId(0);
532 } else {
533 try {
534 current.setChangesetId(Integer.parseInt(v));
535 } catch (IllegalArgumentException e) {
536 Main.debug(e.getMessage());
537 if (current.isNew()) {
538 // for a new primitive we just log a warning
539 Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.",
540 v, current.getUniqueId()));
541 current.setChangesetId(0);
542 } else {
543 // for an existing primitive this is a problem
544 throwException(tr("Illegal value for attribute ''changeset''. Got {0}.", v), e);
545 }
546 } catch (IllegalStateException e) {
547 // thrown for positive changeset id on new primitives
548 Main.debug(e);
549 Main.info(e.getMessage());
550 current.setChangesetId(0);
551 }
552 if (current.getChangesetId() <= 0) {
553 if (current.isNew()) {
554 // for a new primitive we just log a warning
555 Main.info(tr("Illegal value for attribute ''changeset'' on new object {1}. Got {0}. Resetting to 0.",
556 v, current.getUniqueId()));
557 current.setChangesetId(0);
558 } else {
559 // for an existing primitive this is a problem
560 throwException(tr("Illegal value for attribute ''changeset''. Got {0}.", v));
561 }
562 }
563 }
564 }
565
566 private long getLong(String name) throws XMLStreamException {
567 String value = parser.getAttributeValue(null, name);
568 if (value == null) {
569 throwException(tr("Missing required attribute ''{0}''.", name));
570 }
571 try {
572 return Long.parseLong(value);
573 } catch (NumberFormatException e) {
574 throwException(tr("Illegal long value for attribute ''{0}''. Got ''{1}''.", name, value), e);
575 }
576 return 0; // should not happen
577 }
578
579 /**
580 * Exception thrown after user cancelation.
581 */
582 private static final class OsmParsingCanceledException extends XmlStreamParsingException implements ImportCancelException {
583 /**
584 * Constructs a new {@code OsmParsingCanceledException}.
585 * @param msg The error message
586 * @param location The parser location
587 */
588 OsmParsingCanceledException(String msg, Location location) {
589 super(msg, location);
590 }
591 }
592
593 @Override
594 protected DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
595 if (progressMonitor == null) {
596 progressMonitor = NullProgressMonitor.INSTANCE;
597 }
598 ProgressMonitor.CancelListener cancelListener = () -> cancel = true;
599 progressMonitor.addCancelListener(cancelListener);
600 CheckParameterUtil.ensureParameterNotNull(source, "source");
601 try {
602 progressMonitor.beginTask(tr("Prepare OSM data...", 2));
603 progressMonitor.indeterminateSubTask(tr("Parsing OSM data..."));
604
605 try (InputStreamReader ir = UTFInputStreamReader.create(source)) {
606 XMLInputFactory factory = XMLInputFactory.newInstance();
607 // do not try to load external entities
608 factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
609 factory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE);
610 setParser(factory.createXMLStreamReader(ir));
611 parse();
612 }
613 progressMonitor.worked(1);
614
615 progressMonitor.indeterminateSubTask(tr("Preparing data set..."));
616 prepareDataSet();
617 progressMonitor.worked(1);
618
619 // iterate over registered postprocessors and give them each a chance
620 // to modify the dataset we have just loaded.
621 if (postprocessors != null) {
622 for (OsmServerReadPostprocessor pp : postprocessors) {
623 pp.postprocessDataSet(getDataSet(), progressMonitor);
624 }
625 }
626 return getDataSet();
627 } catch (IllegalDataException e) {
628 throw e;
629 } catch (XmlStreamParsingException e) {
630 throw new IllegalDataException(e.getMessage(), e);
631 } catch (XMLStreamException e) {
632 String msg = e.getMessage();
633 Pattern p = Pattern.compile("Message: (.+)");
634 Matcher m = p.matcher(msg);
635 if (m.find()) {
636 msg = m.group(1);
637 }
638 if (e.getLocation() != null)
639 throw new IllegalDataException(tr("Line {0} column {1}: ",
640 e.getLocation().getLineNumber(), e.getLocation().getColumnNumber()) + msg, e);
641 else
642 throw new IllegalDataException(msg, e);
643 } catch (IOException e) {
644 throw new IllegalDataException(e);
645 } finally {
646 progressMonitor.finishTask();
647 progressMonitor.removeCancelListener(cancelListener);
648 }
649 }
650
651 /**
652 * Parse the given input source and return the dataset.
653 *
654 * @param source the source input stream. Must not be null.
655 * @param progressMonitor the progress monitor. If null, {@link NullProgressMonitor#INSTANCE} is assumed
656 *
657 * @return the dataset with the parsed data
658 * @throws IllegalDataException if an error was found while parsing the data from the source
659 * @throws IllegalArgumentException if source is null
660 */
661 public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
662 return new OsmReader().doParseDataSet(source, progressMonitor);
663 }
664}
Note: See TracBrowser for help on using the repository browser.