Changeset 18675 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2023-02-22T19:14:00+01:00 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.