Class AzimuthalEquidistant
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.proj.AbstractProj
-
- org.openstreetmap.josm.data.projection.proj.AzimuthalEquidistant
-
- All Implemented Interfaces:
Proj
public class AzimuthalEquidistant extends AbstractProj
Azimuthal Equidistant projection.This implementation does not include the Guam or Micronesia variants.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AzimuthalEquidistant.Mode
The four possible modes or aspects of the projection.
-
Field Summary
Fields Modifier and Type Field Description protected double
centralMeridian
Central longitude in radians.protected double
cosph0
The cosine of the central latitude of the projection.static double
EPS10
Less strict tolerance.static double
HALF_PI
Half of π.protected double
latitudeOfOrigin
Latitude of origin in radians.protected AzimuthalEquidistant.Mode
mode
The mode or aspect of the projection.protected double
mp
Meridian distance from the equator to the pole.protected double
semiMajor
Length of semi-major axis, in metres.protected double
semiMinor
Length of semi-minor axis, in metres.protected double
sinph0
The sine of the central latitude of the projection.static double
TOL
Stricter tolerance.
-
Constructor Summary
Constructors Constructor Description AzimuthalEquidistant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bounds
getAlgorithmBounds()
Return the bounds where this projection is applicable.java.lang.String
getName()
Replies a human readable name of this projection.java.lang.String
getProj4Id()
Replies the Proj.4 identifier.void
initialize(ProjParameters params)
Initialize the projection using the provided parameters.double[]
invproject(double east, double north)
Convert east/north to lat/lon.(package private) double[]
invprojectEllipsoidal(double east, double north)
(package private) double[]
invprojectSpherical(double east, double north)
double[]
project(double latRad, double lonRad)
Convert lat/lon to east/north.(package private) double[]
projectEllipsoidal(double latRad, double lonRad)
(package private) double[]
projectSpherical(double latRad, double lonRad)
-
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
-
EPS10
public static final double EPS10
Less strict tolerance.- See Also:
- Constant Field Values
-
TOL
public static final double TOL
Stricter tolerance.- See Also:
- Constant Field Values
-
HALF_PI
public static final double HALF_PI
Half of π.- See Also:
- Constant Field Values
-
semiMajor
protected double semiMajor
Length of semi-major axis, in metres. This is named 'a' or 'R' (Radius in spherical cases) in Snyder.
-
semiMinor
protected double semiMinor
Length of semi-minor axis, in metres. This is named 'b' in Snyder.
-
centralMeridian
protected double centralMeridian
Central longitude in radians. Default value is 0, the Greenwich meridian. This is called 'lambda0' in Snyder.
-
latitudeOfOrigin
protected double latitudeOfOrigin
Latitude of origin in radians. Default value is 0, the equator. This is called 'phi0' in Snyder.
-
mode
protected AzimuthalEquidistant.Mode mode
The mode or aspect of the projection.
-
sinph0
protected double sinph0
The sine of the central latitude of the projection.
-
cosph0
protected double cosph0
The cosine of the central latitude of the projection.
-
mp
protected double mp
Meridian distance from the equator to the pole. Not used and set to NaN for non-polar projections.
-
-
Constructor Detail
-
AzimuthalEquidistant
public AzimuthalEquidistant()
-
-
Method Detail
-
getName
public java.lang.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 java.lang.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
-
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
-
project
public double[] project(double latRad, double lonRad)
Description copied from interface:Proj
Convert lat/lon to east/north.- Parameters:
latRad
- the latitude in radianslonRad
- 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 east, double north)
Description copied from interface:Proj
Convert east/north to lat/lon.- Parameters:
east
- east value in meters, divided by the semi major axis of the ellipsoidnorth
- north value in meters, divided by the semi major axis of the ellipsoid- Returns:
- array of length 2, containing lat and lon in radians.
-
projectSpherical
double[] projectSpherical(double latRad, double lonRad)
-
invprojectSpherical
double[] invprojectSpherical(double east, double north)
-
projectEllipsoidal
double[] projectEllipsoidal(double latRad, double lonRad)
-
invprojectEllipsoidal
double[] invprojectEllipsoidal(double east, double north)
-
-