Changeset 14048 in osm for applications/editors/josm
- Timestamp:
- 2009-03-09T15:46:56+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r14045 r14048 321 321 322 322 /** 323 * Calculate the length of a side (from node i to i+1) in a way. 323 * Calculate the length of a side (from node i to i+1) in a way. This assumes that 324 * the way is closed, but I only ever call it for buildings. 324 325 */ 325 326 private double sideLength(Way w, int i) { 326 327 Node a = w.nodes.get(i); 327 Node b = w.nodes.get( i+1);328 Node b = w.nodes.get((i+1) % (w.nodes.size() - 1)); 328 329 return a.coor.greatCircleDistance(b.coor); 329 330 } … … 369 370 370 371 /** 371 * Calculate "sideness" metric for each segment in a way. 372 * Calculate "sideness" metric for each segment in a way. 372 373 */ 373 374 private double[] calculateSideness(Way w) {
Note:
See TracChangeset
for help on using the changeset viewer.