- Timestamp:
- 2023-02-22T19:14:00+01:00 (21 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/PowerLines.java
r18553 r18675 131 131 for (int i = 0; i < w.getNodesCount() - 1; i++) { 132 132 final WaySegment es1 = new WaySegment(w, i); 133 CrossingWays.getSegments(this.cellSegmentsWater, es1.getFirstNode(), es1.getSecondNode()).forEach(list -> list.add(es1)); 133 final Node first = es1.getFirstNode(); 134 final Node second = es1.getSecondNode(); 135 136 if (first.isLatLonKnown() && second.isLatLonKnown()) { 137 CrossingWays.getSegments(this.cellSegmentsWater, first, second).forEach(list -> list.add(es1)); 138 } 134 139 } 135 140 } -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r18590 r18675 939 939 */ 940 940 public static EastNorth getCentroid(List<? extends INode> nodes) { 941 return getCentroidEN(nodes.stream(). map(INode::getEastNorth).collect(Collectors.toList()));941 return getCentroidEN(nodes.stream().filter(INode::isLatLonKnown).map(INode::getEastNorth).collect(Collectors.toList())); 942 942 } 943 943 … … 955 955 } else if (size == 2) { 956 956 return nodes.get(0).getCenter(nodes.get(1)); 957 } else if (size == 0) { 958 return null; 957 959 } 958 960
Note:
See TracChangeset
for help on using the changeset viewer.