Changeset 9116 in josm for trunk/src/org
 Timestamp:
 20151213T22:29:34+01:00 (4 years ago)
 Location:
 trunk/src/org/openstreetmap/josm/data/projection/proj
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
r9112 r9116 121 121 } 122 122 123 public static double normalizeLon(double lon) { 124 if (lon >=  Math.PI && lon <= Math.PI) 125 return lon; 126 else { 127 lon = lon % (2 * Math.PI); 128 if (lon > Math.PI) { 129 return lon  2 * Math.PI; 130 } else if (lon < Math.PI) { 131 return lon + 2 * Math.PI; 132 } 133 return lon; 134 } 135 } 123 136 } 
trunk/src/org/openstreetmap/josm/data/projection/proj/LambertConformalConic.java
r8510 r9116 24 24 * @author Pieren 25 25 */ 26 public class LambertConformalConic implementsProj {26 public class LambertConformalConic extends AbstractProj { 27 27 28 28 protected Ellipsoid ellps; … … 154 154 @Override 155 155 public double[] project(double phi, double lambda) { 156 lambda = normalizeLon(lambda); 156 157 double sinphi = sin(phi); 157 158 double l = (0.5*log((1+sinphi)/(1sinphi)))  e/2*log((1+e*sinphi)/(1e*sinphi)); 
trunk/src/org/openstreetmap/josm/data/projection/proj/TransverseMercator.java
r9112 r9116 125 125 @Override 126 126 public double[] project(double y, double x) { 127 x = normalizeLon(x); 127 128 double sinphi = Math.sin(y); 128 129 double cosphi = Math.cos(y);
Note: See TracChangeset
for help on using the changeset viewer.