Package com.luciad.projection
Class TLcdCassiniSoldner
java.lang.Object
com.luciad.projection.ALcdProjection
com.luciad.projection.ALcdTransverseCylindrical
com.luciad.projection.TLcdCassini
com.luciad.projection.TLcdCassiniSoldner
- All Implemented Interfaces:
ILcdProjection
,ILcdTransverseCylindrical
,ILcdPropertyChangeSource
,Serializable
,Cloneable
Ellipsoidal version of the Cassini projection.
Introduction
The Cassini projection is the transverse aspect of the equidistant cylindrical projection. The globe is first rotated so the central meridian becomes the "equator", and then the normal equidistant cylindrical projection is applied.
Properties
- Neither equal-area nor conformal.
- The central meridian, each meridian 90° from the central meridian and the Equator are shown as straight lines.
- Other meridians and parallels are complex curves.
- Scale is
true
along the central meridian and lines perpendicular to it. - Scale is constant but not
true
along lines other meridians.
Example
Sample code
ILcdProjection projection =
new TLcdCassiniSoldner(-40.0);
Implementation aspects
The equations of the cassini projection are taken from [Snyder1987].
Limitations
The ellipsoidal formulae are only useful in a zone, extending 3 to 4 degrees of longitude from the central meridian.
- Since:
- 2020.0
- See Also:
-
Field Summary
Fields inherited from class com.luciad.projection.ALcdProjection
fPropertyChangeDispatcher
Fields inherited from interface com.luciad.projection.ILcdProjection
EPSILON
-
Constructor Summary
ConstructorDescriptionConstructs a Cassini-Soldner projection with the point of origin at(0,0)
.TLcdCassiniSoldner
(double aCentralMeridian) Constructs a Cassini-Soldner projection with the given central meridian and the origin latitude at the equator.TLcdCassiniSoldner
(double aCentralMeridian, double aOriginLat) Constructs a Cassini-Soldner projection with the given central meridian and origin latitude. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
boundaryLats
(double lon) Default implementation.double[][]
boundaryLons
(double lat) Default implementation.protected void
Constants based on the central meridian of the projection don't have to be recalculated every time a method is called.clone()
Makes a deep clone of thisILcdProjection
.boolean
Checks if thisILcdProjection
equals some other Object.double
Returns the maximum longitude distance from the central meridian that are considered within within the projection boundaries.int
hashCode()
boolean
inLonLatBounds
(ILcdPoint aLLP) Checks if anILcdPoint
is inside the valid area of geodetic coordinates of the projection.boolean
inWorldBoundsOnEllipsoid
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid) Default implementation callsinWorldBoundsOnSphere
withaEllipsoid.getAuxRadius()
as sphere radius.boolean
If all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjection
and all (x,y ) coordinates are bounded this istrue
.void
loadProperties
(String aPrefix, Properties aProperty) Load the property of anALcdTransverseCylindrical
: the central meridian of the projection.void
lonlatheight2worldOnEllipsoidSFCT
(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) Default implementation callslonlatheight2worldOnEllipsoidSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.void
setLongitudeLimit
(double aLongitudeLimit) Sets the maximum longitude distance from the central meridian that are considered within the projection boundaries.toString()
Returns theString
representation of the Cassini projection.void
world2DEditableBoundsOnEllipsoidSFCT
(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBoundsSFCT) Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.void
world2lonlatOnEllipsoidSFCT
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.void
writePropertiesSFCT
(String aPrefix, Properties aPropertySFCT) Writes the property of anALcdTransverseCylindrical
: the central meridian of the projection.Methods inherited from class com.luciad.projection.TLcdCassini
inWorldBoundsOnSphere, isContinuous, lonlatheight2worldOnSphereSFCT, world2DEditableBoundsOnSphereSFCT, world2lonlatOnSphereSFCT
Methods inherited from class com.luciad.projection.ALcdTransverseCylindrical
getCentralMeridian, getOrigin, getOriginLat, setCentralMeridian, setOriginLat
Methods inherited from class com.luciad.projection.ALcdProjection
addPropertyChangeListener, firePropertyChangeEvent, removePropertyChangeListener
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
TLcdCassiniSoldner
public TLcdCassiniSoldner()Constructs a Cassini-Soldner projection with the point of origin at(0,0)
. -
TLcdCassiniSoldner
public TLcdCassiniSoldner(double aCentralMeridian) Constructs a Cassini-Soldner projection with the given central meridian and the origin latitude at the equator.- Parameters:
aCentralMeridian
- the central meridian of the projection.
-
TLcdCassiniSoldner
public TLcdCassiniSoldner(double aCentralMeridian, double aOriginLat) Constructs a Cassini-Soldner projection with the given central meridian and origin latitude.- Parameters:
aCentralMeridian
- the central meridian of the projection.aOriginLat
- the latitude of the point of origin of the projection.
-
-
Method Details
-
getLongitudeLimit
public double getLongitudeLimit()Returns the maximum longitude distance from the central meridian that are considered within within the projection boundaries.- Returns:
- the maximum longitude distance (in degrees) from the central meridian
-
setLongitudeLimit
public void setLongitudeLimit(double aLongitudeLimit) Sets the maximum longitude distance from the central meridian that are considered within the projection boundaries. The default is 5.0.- Parameters:
aLongitudeLimit
- a longitude distance (in degrees)
-
calculateCachedValues
protected void calculateCachedValues()Description copied from class:ALcdTransverseCylindrical
Constants based on the central meridian of the projection don't have to be recalculated every time a method is called. They only have to be calculated when the projection properties change. Within the methods the precalculated values then can be used in order to gain efficiency.- Overrides:
calculateCachedValues
in classALcdTransverseCylindrical
-
lonlatheight2worldOnEllipsoidSFCT
public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException Description copied from class:ALcdProjection
Default implementation callslonlatheight2worldOnEllipsoidSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
lonlatheight2worldOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
lonlatheight2worldOnEllipsoidSFCT
in classALcdProjection
- Parameters:
aLLHP
- point to be projected.aEllipsoid
- ellipsoid on which the point is defined.aXYPointSFCT
- projected point as side effect.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aLLHP
is not within the valid area of the projection (visible area), then this exception is thrown.
-
world2lonlatOnEllipsoidSFCT
public void world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) throws TLcdOutOfBoundsException Description copied from class:ALcdProjection
Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
world2lonlatOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
world2lonlatOnEllipsoidSFCT
in classALcdProjection
- Parameters:
aXYPoint
- projected point for which the corresponding geodetic point is sought.aEllipsoid
- ellipsoid on which the geodetic coordinate is defined.aLLPointSFCT
- resulting geodetic coordinate as side effect.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aXYPoint
is not within the valid area of the projection (visible area), then this exception is thrown.
-
world2DEditableBoundsOnEllipsoidSFCT
public void world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBoundsSFCT) Description copied from class:ALcdProjection
Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
world2DEditableBoundsOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
world2DEditableBoundsOnEllipsoidSFCT
in classALcdProjection
- Parameters:
aEllipsoid
- ellipsoid considered.aWorldBoundsSFCT
- the bounds of the projection in world coordinates as side effect.
-
inWorldBoundsOnEllipsoid
Description copied from class:ALcdProjection
Default implementation callsinWorldBoundsOnSphere
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
inWorldBoundsOnEllipsoid
in interfaceILcdProjection
- Overrides:
inWorldBoundsOnEllipsoid
in classALcdProjection
- Parameters:
aXYPoint
- point to be checked upon.aEllipsoid
- ellipsoid on which the geodetic coordinate is defined.- Returns:
true
if valid,false
if invalid.- See Also:
-
inLonLatBounds
Description copied from interface:ILcdProjection
Checks if anILcdPoint
is inside the valid area of geodetic coordinates of the projection. The valid area is determined by the LonLatPoints that are visible and for which the corresponding cartesian coordinate is within the boundaries.- Specified by:
inLonLatBounds
in interfaceILcdProjection
- Overrides:
inLonLatBounds
in classTLcdCassini
- Parameters:
aLLP
-ILcdPoint
to be checked upon.- Returns:
true
if valid,false
if invalid.
-
isAllInBounds
public boolean isAllInBounds()Description copied from interface:ILcdProjection
If all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjection
and all (x,y ) coordinates are bounded this istrue
. AllILcdProjection
objects have bounded (x,y ) coordinates because the projection is cut off if necessary.- Specified by:
isAllInBounds
in interfaceILcdProjection
- Overrides:
isAllInBounds
in classTLcdCassini
- Returns:
true
if all LonLatPoints are within the bounds of the projection,false
otherwise.
-
boundaryLons
public double[][] boundaryLons(double lat) Description copied from class:ALcdProjection
Default implementation. To be redefined for specific projections.- Specified by:
boundaryLons
in interfaceILcdProjection
- Overrides:
boundaryLons
in classTLcdCassini
- Parameters:
lat
- latitude in decimal degrees and -90.0 <=aLat
<= 90.0.- Returns:
- the array of pairs of longitudes[0] and longitudes[1], where the closed interval longitudes[0] -> longitudes[1] is in visible area and -180.0 <= lon[i] <= 180.0.
-
boundaryLats
public double[][] boundaryLats(double lon) Description copied from class:ALcdProjection
Default implementation. To be redefined for specific projections.- Specified by:
boundaryLats
in interfaceILcdProjection
- Overrides:
boundaryLats
in classTLcdCassini
- Parameters:
lon
- longitude in decimal degrees -180.0 <= lon <= 180.0 .- Returns:
- the array of pairs of latitudes lats[0] and lats[1], where the closed interval lats[0] -> lats[1] is in visible area and -90.0 <= lats[i] <= 90.0 .
-
clone
Description copied from interface:ILcdProjection
Makes a deep clone of thisILcdProjection
.- Specified by:
clone
in interfaceILcdProjection
- Overrides:
clone
in classALcdTransverseCylindrical
- Returns:
- deep clone of this
ILcdProjection
.
-
toString
Description copied from class:TLcdCassini
Returns theString
representation of the Cassini projection.- Specified by:
toString
in interfaceILcdProjection
- Overrides:
toString
in classTLcdCassini
- Returns:
- the
String
representation of the Cassini projection.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classALcdTransverseCylindrical
-
equals
Description copied from interface:ILcdProjection
Checks if thisILcdProjection
equals some other Object.- Specified by:
equals
in interfaceILcdProjection
- Overrides:
equals
in classALcdTransverseCylindrical
- Parameters:
aO
- Object to compare with.- Returns:
- true if the Object is an instance of the same
ILcdProjection
class and having the same projection properties, false otherwise.
-
loadProperties
Description copied from class:ALcdTransverseCylindrical
Load the property of anALcdTransverseCylindrical
: the central meridian of the projection. This method will, given aPrefix, analyze the aProperties object to set the property of thisALcdTransverseCylindrical
. The value of following key is retrieved:- <aPrefix><the name of the class that extends this abstract class>.centralMeridian
- <aPrefix><the name of the class that extends this abstract class>.originLat
- Specified by:
loadProperties
in interfaceILcdProjection
- Overrides:
loadProperties
in classALcdTransverseCylindrical
- Parameters:
aPrefix
- prefix of the property names.aProperty
- Properties object containing the serialized properties.- Throws:
IllegalArgumentException
- if the projection cannot be created.
-
writePropertiesSFCT
Description copied from class:ALcdTransverseCylindrical
Writes the property of anALcdTransverseCylindrical
: the central meridian of the projection. This method will, given aPrefix, store the property of thisALcdTransverseCylindrical
the aProperties object. The value of following key is stored:- <aPrefix><the name of the class that extends this abstract class>.centralMeridian
- <aPrefix><the name of the class that extends this abstract class>.originLat
- Specified by:
writePropertiesSFCT
in interfaceILcdProjection
- Overrides:
writePropertiesSFCT
in classALcdTransverseCylindrical
- Parameters:
aPrefix
- prefix for the property names.aPropertySFCT
- Properties object to store the serialized properties by side effect.
-