Changeset 34630 in osm for applications/editors/josm/plugins
- Timestamp:
- 2018-09-11T00:46:18+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileVEC.java
r34355 r34630 11 11 import java.util.Map; 12 12 import java.util.Objects; 13 import java.util.Optional; 13 14 import java.util.function.BiConsumer; 14 15 import java.util.function.BiPredicate; … … 661 662 EastNorth en = ab.points.get(ab.nPoints - 1); 662 663 Stream<ArcBlock> stream = arcs.stream().filter(a -> a.points.get(0).equalsEpsilon(en, EPSILON)); 663 assert stream.count() == 1; 664 newArcs.add(stream.findAny().get()); 664 Optional<ArcBlock> x = stream.findAny(); 665 if (!x.isPresent()) { 666 // Problem observed with 31248000AO01. Choose the nearest node 667 Logging.warn("Degraded mode for " + obj + " around " + en); 668 stream = arcs.stream() 669 .sorted((o1, o2) -> Double.compare(en.distance(o1.points.get(0)), en.distance(o2.points.get(0)))); 670 x = stream.findFirst(); 671 } 672 newArcs.add(x.get()); 665 673 } 666 674 assert newArcs.size() == arcs.size(); -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/pci/EdigeoPciReader.java
r34458 r34630 276 276 throw e; 277 277 } catch (Exception | AssertionError e) { 278 Logging.error(e); 278 279 throw new IOException(e); 279 280 }
Note:
See TracChangeset
for help on using the changeset viewer.