Changeset 14045 in osm for applications
- Timestamp:
- 2009-03-09T14:17:12+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
r14026 r14045 284 284 } 285 285 286 // if the second side has a shorter length and an approximately equal 287 // sideness then its better to choose the shorter, as with quadrilaterals 288 // created using the orthogonalise tool the sideness will be about the 289 // same for all sides. 290 if (sideLength(w, side1) > sideLength(w, side1 + 1) && 291 Math.abs(sideness[side1] - sideness[side1 + 1]) < 0.001) { 292 side1 = side1 + 1; 293 side2 = (side2 + 1) % (w.nodes.size() - 1); 294 } 295 286 296 // swap side1 and side2 into sorted order. 287 297 if (side1 > side2) { … … 308 318 309 319 return new Pair<Way, Way>(front, back); 320 } 321 322 /** 323 * Calculate the length of a side (from node i to i+1) in a way. 324 */ 325 private double sideLength(Way w, int i) { 326 Node a = w.nodes.get(i); 327 Node b = w.nodes.get(i+1); 328 return a.coor.greatCircleDistance(b.coor); 310 329 } 311 330 … … 460 479 x = ((JSpinner.DefaultEditor)chi.getEditor()).getTextField(); 461 480 x.setColumns(5); 462 addLabelled( "From number: ", clo);463 addLabelled( "To number: ", chi);464 addLabelled( "Interpolation: ", step);465 addLabelled( "Street name (Optional): ", street);481 addLabelled(tr("Highest number") + ": ", chi); 482 addLabelled(tr("Lowest number") + ": ", clo); 483 addLabelled(tr("Interpolation") + ": ", step); 484 addLabelled(tr("Street name") + " (" + tr("Optional") + "): ", street); 466 485 } 467 486
Note:
See TracChangeset
for help on using the changeset viewer.