Changeset 32556 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java
- Timestamp:
- 2016-07-04T14:18:17+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/SimplifyWay.java
r30737 r32556 1 // License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others1 // License: GPL. For details, see LICENSE file. 2 2 package cadastre_fr; 3 3 … … 10 10 /** 11 11 * Imported from plugin UtilsPlugin 12 * @author 12 * @author 13 13 * 14 14 */ … … 26 26 simplifyWayRange(wnew, from, to, ns, thr); 27 27 List<Node> nodes = wnew.getNodes(); 28 for (int j = to - 1; j > from; j--) 28 for (int j = to - 1; j > from; j--) { 29 29 nodes.remove(j); 30 } 30 31 nodes.addAll(from+1, ns); 31 32 wnew.setNodes(nodes); 32 33 } 33 34 } 34 35 35 36 /* 36 37 * Takes an interval [from,to] and adds nodes from (from,to) to ns. … … 60 61 } 61 62 } 63 62 64 public static double EARTH_RAD = 6378137.0; 65 63 66 /* From Aviaton Formulary v1.3 64 67 * http://williams.best.vwh.net/avform.htm … … 74 77 % (2 * Math.PI); 75 78 } 79 76 80 public static double xtd(double lat1, double lon1, double lat2, double lon2, double lat3, double lon3) { 77 81 double dist_AD = dist(lat1, lon1, lat3, lon3); … … 80 84 return Math.asin(Math.sin(dist_AD) * Math.sin(crs_AD - crs_AB)); 81 85 } 82 83 86 }
Note:
See TracChangeset
for help on using the changeset viewer.