Changeset 6230 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2013-09-11T00:41:49+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r6113 r6230 654 654 } 655 655 656 /** 657 * Compute the centroid of nodes 658 * @param nodes Nodes for which the centroid is wanted 659 * @return the centroid of nodes 660 */ 656 661 public static EastNorth getCentroid(List<Node> nodes) { 657 // Compute the centroid of nodes 658 659 BigDecimal area = new BigDecimal(0); 660 BigDecimal north = new BigDecimal(0); 661 BigDecimal east = new BigDecimal(0); 662 663 BigDecimal area = BigDecimal.ZERO; 664 BigDecimal north = BigDecimal.ZERO; 665 BigDecimal east = BigDecimal.ZERO; 662 666 663 667 // See http://en.wikipedia.org/w/index.php?title=Centroid&oldid=294224857#Centroid_of_polygon for the equation used here
Note:
See TracChangeset
for help on using the changeset viewer.