# Changeset 9419 in josm for trunk/src/org/openstreetmap/josm/data/projection/proj

Ignore:
Timestamp:
2016-01-12T17:39:45+01:00 (5 years ago)
Message:

add Albers Equal Area Projection and Polar Stereographic Projection (see #12186)
(imports pieces of code from the Geotools project)

Location:
trunk/src/org/openstreetmap/josm/data/projection/proj
Files:
2 edited

Unmodified
Removed
• ## trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java

 r9132 /** * Ellipsoid excentricity, equals to sqrt({@link #excentricitySquared}). * Value 0 means that the ellipsoid is spherical. * * @see #excentricitySquared */ protected double e; /** * The square of excentricity: e² = (a²-b²)/a² where * e is the excentricity, public void initialize(ProjParameters params) throws ProjectionConfigurationException { e2 = params.ellps.e2; e = params.ellps.e; //  Compute constants for the mlfn double t; } } /** * Computes function f(s,c,e²) = c/sqrt(1 - s²×e²) needed for the true scale * latitude (Snyder 14-15), where s and c are the sine and cosine of * the true scale latitude, and is the {@linkplain #excentricitySquared * eccentricity squared}. */ final double msfn(final double s, final double c) { return c / Math.sqrt(1.0 - (s*s) * e2); } /** * Computes function (15-9) and (9-13) from Snyder. * Equivalent to negative of function (7-7). */ final double tsfn(final double lat, double sinlat) { sinlat *= e; /* * NOTE: change sign to get the equivalent of Snyder (7-7). */ return Math.tan(0.5 * (Math.PI/2 - lat)) / Math.pow((1 - sinlat) / (1 + sinlat), 0.5*e); } }
• ## trunk/src/org/openstreetmap/josm/data/projection/proj/ProjParameters.java

 r8346 public Double lat1; public Double lat2; public Double lat_ts; }
Note: See TracChangeset for help on using the changeset viewer.