Class CassiniSoldner
- java.lang.Object
-
- org.openstreetmap.josm.data.projection.proj.AbstractProj
-
- org.openstreetmap.josm.data.projection.proj.CassiniSoldner
-
- All Implemented Interfaces:
Proj
public class CassiniSoldner extends AbstractProj
Cassini-Soldner Projection (EPSG code 9806). The Cassini-Soldner Projection is the ellipsoidal version of the Cassini projection for the sphere. It is not conformal but as it is relatively simple to construct it was extensively used in the last century and is still useful for mapping areas with limited longitudinal extent. It has now largely been replaced by the conformal Transverse Mercator which it resembles. Like this, it has a straight central meridian along which the scale is true, all other meridians and parallels are curved, and the scale distortion increases rapidly with increasing distance from the central meridian.This class has been derived from the implementation of the Geotools project; git 8cbf52d, org.geotools.referencing.operation.projection.CassiniSoldner at the time of migration.
-
-
Field Summary
Fields Modifier and Type Field Description private static double
C1
Constants used for the forward and inverse transform for the elliptical case of the Cassini-Soldner.private static double
C2
private static double
C3
private static double
C4
private static double
C5
private double
ml0
Meridian distance at thelatitudeOfOrigin
.private double
phi0
Latitude of origin.
-
Constructor Summary
Constructors Constructor Description CassiniSoldner()
-
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 x, double y)
Convert east/north to lat/lon.double[]
project(double phi, double lam)
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
-
ml0
private double ml0
Meridian distance at thelatitudeOfOrigin
. Used for calculations for the ellipsoid.
-
phi0
private double phi0
Latitude of origin.
-
C1
private static final double C1
Constants used for the forward and inverse transform for the elliptical case of the Cassini-Soldner.- See Also:
- Constant Field Values
-
C2
private static final double C2
- See Also:
- Constant Field Values
-
C3
private static final double C3
- See Also:
- Constant Field Values
-
C4
private static final double C4
- See Also:
- Constant Field Values
-
C5
private static final double C5
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CassiniSoldner
public CassiniSoldner()
-
-
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
-
project
public double[] project(double phi, double lam)
Description copied from interface:Proj
Convert lat/lon to east/north.- Parameters:
phi
- the latitude in radianslam
- 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
-
-