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
truealong the central meridian and lines perpendicular to it. - Scale is constant but not
truealong 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
fPropertyChangeDispatcherFields inherited from interface com.luciad.projection.ILcdProjection
EPSILON -
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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 voidConstants 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.booleanChecks if thisILcdProjectionequals some other Object.doubleReturns the maximum longitude distance from the central meridian that are considered within within the projection boundaries.inthashCode()booleaninLonLatBounds(ILcdPoint aLLP) Checks if anILcdPointis inside the valid area of geodetic coordinates of the projection.booleaninWorldBoundsOnEllipsoid(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid) Default implementation callsinWorldBoundsOnSpherewithaEllipsoid.getAuxRadius()as sphere radius.booleanIf all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjectionand all (x,y ) coordinates are bounded this istrue.voidloadProperties(String aPrefix, Properties aProperty) Load the property of anALcdTransverseCylindrical: the central meridian of the projection.voidlonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) Default implementation callslonlatheight2worldOnEllipsoidSFCTwithaEllipsoid.getAuxRadius()as sphere radius.voidsetLongitudeLimit(double aLongitudeLimit) Sets the maximum longitude distance from the central meridian that are considered within the projection boundaries.toString()Returns theStringrepresentation of the Cassini projection.voidworld2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBoundsSFCT) Default implementation callsworld2lonlatOnSphereSFCTwithaEllipsoid.getAuxRadius()as sphere radius.voidworld2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) Default implementation callsworld2lonlatOnSphereSFCTwithaEllipsoid.getAuxRadius()as sphere radius.voidwritePropertiesSFCT(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, world2lonlatOnSphereSFCTMethods inherited from class com.luciad.projection.ALcdTransverseCylindrical
getCentralMeridian, getOrigin, getOriginLat, setCentralMeridian, setOriginLatMethods inherited from class com.luciad.projection.ALcdProjection
addPropertyChangeListener, firePropertyChangeEvent, removePropertyChangeListenerMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:ALcdTransverseCylindricalConstants 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:
calculateCachedValuesin classALcdTransverseCylindrical
-
lonlatheight2worldOnEllipsoidSFCT
public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException Description copied from class:ALcdProjectionDefault implementation callslonlatheight2worldOnEllipsoidSFCTwithaEllipsoid.getAuxRadius()as sphere radius.- Specified by:
lonlatheight2worldOnEllipsoidSFCTin interfaceILcdProjection- Overrides:
lonlatheight2worldOnEllipsoidSFCTin classALcdProjection- Parameters:
aLLHP- point to be projected.aEllipsoid- ellipsoid on which the point is defined.aXYPointSFCT- projected point as side effect.- Throws:
TLcdOutOfBoundsException- If theILcdPointaLLHPis 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:ALcdProjectionDefault implementation callsworld2lonlatOnSphereSFCTwithaEllipsoid.getAuxRadius()as sphere radius.- Specified by:
world2lonlatOnEllipsoidSFCTin interfaceILcdProjection- Overrides:
world2lonlatOnEllipsoidSFCTin 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 theILcdPointaXYPointis 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:ALcdProjectionDefault implementation callsworld2lonlatOnSphereSFCTwithaEllipsoid.getAuxRadius()as sphere radius.- Specified by:
world2DEditableBoundsOnEllipsoidSFCTin interfaceILcdProjection- Overrides:
world2DEditableBoundsOnEllipsoidSFCTin classALcdProjection- Parameters:
aEllipsoid- ellipsoid considered.aWorldBoundsSFCT- the bounds of the projection in world coordinates as side effect.
-
inWorldBoundsOnEllipsoid
Description copied from class:ALcdProjectionDefault implementation callsinWorldBoundsOnSpherewithaEllipsoid.getAuxRadius()as sphere radius.- Specified by:
inWorldBoundsOnEllipsoidin interfaceILcdProjection- Overrides:
inWorldBoundsOnEllipsoidin classALcdProjection- Parameters:
aXYPoint- point to be checked upon.aEllipsoid- ellipsoid on which the geodetic coordinate is defined.- Returns:
trueif valid,falseif invalid.- See Also:
-
inLonLatBounds
Description copied from interface:ILcdProjectionChecks if anILcdPointis 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:
inLonLatBoundsin interfaceILcdProjection- Overrides:
inLonLatBoundsin classTLcdCassini- Parameters:
aLLP-ILcdPointto be checked upon.- Returns:
trueif valid,falseif invalid.
-
isAllInBounds
public boolean isAllInBounds()Description copied from interface:ILcdProjectionIf all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjectionand all (x,y ) coordinates are bounded this istrue. AllILcdProjectionobjects have bounded (x,y ) coordinates because the projection is cut off if necessary.- Specified by:
isAllInBoundsin interfaceILcdProjection- Overrides:
isAllInBoundsin classTLcdCassini- Returns:
trueif all LonLatPoints are within the bounds of the projection,falseotherwise.
-
boundaryLons
public double[][] boundaryLons(double lat) Description copied from class:ALcdProjectionDefault implementation. To be redefined for specific projections.- Specified by:
boundaryLonsin interfaceILcdProjection- Overrides:
boundaryLonsin 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:ALcdProjectionDefault implementation. To be redefined for specific projections.- Specified by:
boundaryLatsin interfaceILcdProjection- Overrides:
boundaryLatsin 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:ILcdProjectionMakes a deep clone of thisILcdProjection.- Specified by:
clonein interfaceILcdProjection- Overrides:
clonein classALcdTransverseCylindrical- Returns:
- deep clone of this
ILcdProjection.
-
toString
Description copied from class:TLcdCassiniReturns theStringrepresentation of the Cassini projection.- Specified by:
toStringin interfaceILcdProjection- Overrides:
toStringin classTLcdCassini- Returns:
- the
Stringrepresentation of the Cassini projection.
-
hashCode
public int hashCode()- Overrides:
hashCodein classALcdTransverseCylindrical
-
equals
Description copied from interface:ILcdProjectionChecks if thisILcdProjectionequals some other Object.- Specified by:
equalsin interfaceILcdProjection- Overrides:
equalsin classALcdTransverseCylindrical- Parameters:
aO- Object to compare with.- Returns:
- true if the Object is an instance of the same
ILcdProjectionclass and having the same projection properties, false otherwise.
-
loadProperties
Description copied from class:ALcdTransverseCylindricalLoad 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:
loadPropertiesin interfaceILcdProjection- Overrides:
loadPropertiesin 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:ALcdTransverseCylindricalWrites the property of anALcdTransverseCylindrical: the central meridian of the projection. This method will, given aPrefix, store the property of thisALcdTransverseCylindricalthe 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:
writePropertiesSFCTin interfaceILcdProjection- Overrides:
writePropertiesSFCTin classALcdTransverseCylindrical- Parameters:
aPrefix- prefix for the property names.aPropertySFCT- Properties object to store the serialized properties by side effect.
-