Changeset 9230 in josm for trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
- Timestamp:
- 2015-12-31T16:37:24+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r8540 r9230 27 27 import org.openstreetmap.josm.data.osm.OsmPrimitive; 28 28 import org.openstreetmap.josm.data.osm.Way; 29 import org.openstreetmap.josm.data.projection.Ellipsoid; 29 30 import org.openstreetmap.josm.gui.HelpAwareOptionPane; 30 31 import org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec; … … 217 218 * @param to the upper index 218 219 * @param threshold the max error threshold 220 * @param simplifiedNodes list that will contain resulting nodes 219 221 */ 220 222 protected void buildSimplifiedNodeList(List<Node> wnew, int from, int to, double threshold, List<Node> simplifiedNodes) { … … 228 230 for (int i = from + 1; i < to; i++) { 229 231 Node n = wnew.get(i); 230 double xte = Math.abs(E ARTH_RAD232 double xte = Math.abs(Ellipsoid.WGS84.a 231 233 * xtd(fromN.getCoor().lat() * Math.PI / 180, fromN.getCoor().lon() * Math.PI / 180, toN.getCoor().lat() * Math.PI 232 234 / 180, toN.getCoor().lon() * Math.PI / 180, n.getCoor().lat() * Math.PI / 180, n.getCoor().lon() * Math.PI … … 253 255 } 254 256 255 public static final double EARTH_RAD = 6378137.0;256 257 257 /* From Aviaton Formulary v1.3 258 258 * http://williams.best.vwh.net/avform.htm
Note:
See TracChangeset
for help on using the changeset viewer.