Class TLcdCassiniSoldner

All Implemented Interfaces:
ILcdProjection, ILcdTransverseCylindrical, ILcdPropertyChangeSource, Serializable, Cloneable

public final class TLcdCassiniSoldner extends TLcdCassini
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:
  • 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 class ALcdTransverseCylindrical
    • lonlatheight2worldOnEllipsoidSFCT

      public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
      Description copied from class: ALcdProjection
      Default implementation calls lonlatheight2worldOnEllipsoidSFCT with aEllipsoid.getAuxRadius() as sphere radius.
      Specified by:
      lonlatheight2worldOnEllipsoidSFCT in interface ILcdProjection
      Overrides:
      lonlatheight2worldOnEllipsoidSFCT in class ALcdProjection
      Parameters:
      aLLHP - point to be projected.
      aEllipsoid - ellipsoid on which the point is defined.
      aXYPointSFCT - projected point as side effect.
      Throws:
      TLcdOutOfBoundsException - If the ILcdPoint 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 calls world2lonlatOnSphereSFCT with aEllipsoid.getAuxRadius() as sphere radius.
      Specified by:
      world2lonlatOnEllipsoidSFCT in interface ILcdProjection
      Overrides:
      world2lonlatOnEllipsoidSFCT in class ALcdProjection
      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 the ILcdPoint 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 calls world2lonlatOnSphereSFCT with aEllipsoid.getAuxRadius() as sphere radius.
      Specified by:
      world2DEditableBoundsOnEllipsoidSFCT in interface ILcdProjection
      Overrides:
      world2DEditableBoundsOnEllipsoidSFCT in class ALcdProjection
      Parameters:
      aEllipsoid - ellipsoid considered.
      aWorldBoundsSFCT - the bounds of the projection in world coordinates as side effect.
    • inWorldBoundsOnEllipsoid

      public boolean inWorldBoundsOnEllipsoid(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid)
      Description copied from class: ALcdProjection
      Default implementation calls inWorldBoundsOnSphere with aEllipsoid.getAuxRadius() as sphere radius.
      Specified by:
      inWorldBoundsOnEllipsoid in interface ILcdProjection
      Overrides:
      inWorldBoundsOnEllipsoid in class ALcdProjection
      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

      public boolean inLonLatBounds(ILcdPoint aLLP)
      Description copied from interface: ILcdProjection
      Checks if an ILcdPoint 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 interface ILcdProjection
      Overrides:
      inLonLatBounds in class TLcdCassini
      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 an ILcdProjection and all (x,y ) coordinates are bounded this is true. All ILcdProjection objects have bounded (x,y ) coordinates because the projection is cut off if necessary.
      Specified by:
      isAllInBounds in interface ILcdProjection
      Overrides:
      isAllInBounds in class TLcdCassini
      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 interface ILcdProjection
      Overrides:
      boundaryLons in class TLcdCassini
      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 interface ILcdProjection
      Overrides:
      boundaryLats in class TLcdCassini
      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

      public Object clone()
      Description copied from interface: ILcdProjection
      Makes a deep clone of this ILcdProjection.
      Specified by:
      clone in interface ILcdProjection
      Overrides:
      clone in class ALcdTransverseCylindrical
      Returns:
      deep clone of this ILcdProjection.
    • toString

      public String toString()
      Description copied from class: TLcdCassini
      Returns the String representation of the Cassini projection.
      Specified by:
      toString in interface ILcdProjection
      Overrides:
      toString in class TLcdCassini
      Returns:
      the String representation of the Cassini projection.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALcdTransverseCylindrical
    • equals

      public boolean equals(Object aO)
      Description copied from interface: ILcdProjection
      Checks if this ILcdProjection equals some other Object.
      Specified by:
      equals in interface ILcdProjection
      Overrides:
      equals in class ALcdTransverseCylindrical
      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

      public void loadProperties(String aPrefix, Properties aProperty) throws IllegalArgumentException
      Description copied from class: ALcdTransverseCylindrical
      Load the property of an ALcdTransverseCylindrical: the central meridian of the projection. This method will, given aPrefix, analyze the aProperties object to set the property of this ALcdTransverseCylindrical. 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
      The latter is not required and will be assumed to be 0 if not available.
      Specified by:
      loadProperties in interface ILcdProjection
      Overrides:
      loadProperties in class ALcdTransverseCylindrical
      Parameters:
      aPrefix - prefix of the property names.
      aProperty - Properties object containing the serialized properties.
      Throws:
      IllegalArgumentException - if the projection cannot be created.
    • writePropertiesSFCT

      public void writePropertiesSFCT(String aPrefix, Properties aPropertySFCT)
      Description copied from class: ALcdTransverseCylindrical
      Writes the property of an ALcdTransverseCylindrical: the central meridian of the projection. This method will, given aPrefix, store the property of this ALcdTransverseCylindrical 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
      The latter will not be stored if it is equal to 0 .
      Specified by:
      writePropertiesSFCT in interface ILcdProjection
      Overrides:
      writePropertiesSFCT in class ALcdTransverseCylindrical
      Parameters:
      aPrefix - prefix for the property names.
      aPropertySFCT - Properties object to store the serialized properties by side effect.