Class PolarStereographic
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.proj.AbstractProj
-
- org.openstreetmap.josm.data.projection.proj.PolarStereographic
-
- All Implemented Interfaces:
Proj
public class PolarStereographic extends AbstractProj
The polar case of the stereographic projection.In the proj.4 library, the code "stere" covers several variants of the Stereographic projection, depending on the latitude of natural origin (parameter lat_0).
In this file, only the polar case is implemented. This corresponds to EPSG:9810 (Polar Stereographic Variant A) and EPSG:9829 (Polar Stereographic Variant B).
It is required, that the latitude of natural origin has the value +/-90 degrees.
This class has been derived from the implementation of the Geotools project; git 8cbf52d, org.geotools.referencing.operation.projection.PolarStereographic at the time of migration.
References:
- John P. Snyder (Map Projections - A Working Manual,
U.S. Geological Survey Professional Paper 1395, 1987) - "Coordinate Conversions and Transformations including Formulas",
EPSG Guidence Note Number 7, Version 19. - Gerald Evenden. "Supplementary PROJ.4 Notes - Oblique Stereographic Alternative"
- Krakiwsky, E.J., D.B. Thomson, and R.R. Steeves. 1977. A Manual For Geodetic Coordinate Transformations in the Maritimes. Geodesy and Geomatics Engineering, UNB. Technical Report No. 48.
- Thomson, D.B., M.P. Mepham and R.R. Steeves. 1977. The Stereographic Double Projection. Geodesy and Geomatics Engineereng, UNB. Technical Report No. 46.
-
-
Field Summary
Fields Modifier and Type Field Description private static double
EPSILON
Maximum difference allowed when comparing real numbers.private static double
ITERATION_TOLERANCE
Difference allowed in iterative computations.private double
k0
A constant used in the transformations.private static int
MAXIMUM_ITERATIONS
Maximum number of iterations for iterative computations.(package private) boolean
southPole
true
if this projection is for the south pole, orfalse
if it is for the north pole.
-
Constructor Summary
Constructors Constructor Description PolarStereographic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bounds
getAlgorithmBounds()
Return the bounds where this projection is applicable.String
getName()
Replies a human readable name of this projection.String
getProj4Id()
Replies the Proj.4 identifier.void
initialize(ProjParameters params)
Initialize the projection using the provided parameters.double[]
invproject(double x, double y)
Convert east/north to lat/lon.double[]
project(double y, double x)
Convert lat/lon to east/north.-
Methods inherited from class org.openstreetmap.josm.data.projection.proj.AbstractProj
aasin, cphi2, invMlfn, isGeographic, mlfn, msfn, tsfn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openstreetmap.josm.data.projection.proj.Proj
lonIsLinearToEast
-
-
-
-
Field Detail
-
MAXIMUM_ITERATIONS
private static final int MAXIMUM_ITERATIONS
Maximum number of iterations for iterative computations.- See Also:
- Constant Field Values
-
ITERATION_TOLERANCE
private static final double ITERATION_TOLERANCE
Difference allowed in iterative computations.- See Also:
- Constant Field Values
-
EPSILON
private static final double EPSILON
Maximum difference allowed when comparing real numbers.- See Also:
- Constant Field Values
-
k0
private double k0
A constant used in the transformations.
-
southPole
boolean southPole
true
if this projection is for the south pole, orfalse
if it is for the north pole.
-
-
Constructor Detail
-
PolarStereographic
public PolarStereographic()
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:Proj
Replies a human readable name of this projection.- Returns:
- The projection name. must not be null.
-
getProj4Id
public String getProj4Id()
Description copied from interface:Proj
Replies the Proj.4 identifier.- Returns:
- The Proj.4 identifier (as reported by cs2cs -lp).
If no id exists, return
null
.
-
initialize
public void initialize(ProjParameters params) throws ProjectionConfigurationException
Description copied from interface:Proj
Initialize the projection using the provided parameters.- Specified by:
initialize
in interfaceProj
- Overrides:
initialize
in classAbstractProj
- Parameters:
params
- The projection parameters- Throws:
ProjectionConfigurationException
- in case parameters are not suitable
-
project
public double[] project(double y, double x)
Description copied from interface:Proj
Convert lat/lon to east/north.- Parameters:
y
- the latitude in radiansx
- the longitude in radians- Returns:
- array of length 2, containing east and north value in meters, divided by the semi major axis of the ellipsoid.
-
invproject
public double[] invproject(double x, double y)
Description copied from interface:Proj
Convert east/north to lat/lon.- Parameters:
x
- east value in meters, divided by the semi major axis of the ellipsoidy
- north value in meters, divided by the semi major axis of the ellipsoid- Returns:
- array of length 2, containing lat and lon in radians.
-
getAlgorithmBounds
public Bounds getAlgorithmBounds()
Description copied from interface:Proj
Return the bounds where this projection is applicable. This is a fallback for when the projection bounds are not specified explicitly. In this area, the round trip lat/lon -> east/north -> lat/lon should return the starting value with small error. In addition, regions with extreme distortions should be excluded, if possible. It need not be the absolute maximum, but rather an area that is safe to display in JOSM and contain everything that one would expect to use.- Returns:
- the bounds where this projection is applicable, null if unknown
-
-