Changeset 36076 in osm for applications/editors/josm/plugins/opendata/src
- Timestamp:
- 2023-04-20T15:14:44+02:00 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/GeotoolsConverter.java
r36074 r36076 27 27 import org.locationtech.jts.geom.Point; 28 28 import org.locationtech.jts.geom.Polygon; 29 import org.locationtech.jts.io.ParseException; 29 30 import org.opengis.feature.Feature; 30 31 import org.opengis.feature.GeometryAttribute; … … 82 83 FeatureSource<?, ?> featureSource = dataStore.getFeatureSource(typeName); 83 84 FeatureCollection<?, ?> collection = featureSource.getFeatures(); 84 parseFeatures(progressMonitor != null ? progressMonitor.createSubTaskMonitor(1, false) : null, collection); 85 try { 86 parseFeatures(progressMonitor != null ? progressMonitor.createSubTaskMonitor(1, false) : null, collection); 87 // Geotools wraps an IOException in a RuntimeException. We want to keep parsing layers, even if we could not understand 88 // a previous layer. 89 } catch (RuntimeException runtimeException) { 90 if (runtimeException.getCause() instanceof IOException && runtimeException.getCause().getCause() instanceof ParseException) { 91 Logging.error(runtimeException); 92 } else { 93 throw runtimeException; 94 } 95 } 85 96 } 86 97 } finally {
Note:
See TracChangeset
for help on using the changeset viewer.