Class ALcdPerspective

java.lang.Object
com.luciad.projection.ALcdProjection
com.luciad.projection.ALcdPerspective
All Implemented Interfaces:
ILcdAzimuthal, ILcdPerspective, ILcdProjection, ILcdPropertyChangeSource, Serializable, Cloneable
Direct Known Subclasses:
TLcdVerticalPerspective

public abstract class ALcdPerspective extends ALcdProjection implements ILcdPerspective, Cloneable
ALcdPerspective are ILcdProjection objects that have a central point of zero distortion. This central point is the origin of the ALcdPerspective.

An ALcdPerspective has an origin, which is expressed in lat-lon coordinates together with its height above the ellipsoid. The distance of the point of perspective is given from the center of the earth, divided by the semi-major axis. The point of perspective is located along the line through the center of the earth and the point of origin.

See Also:
  • Constructor Details

    • ALcdPerspective

      public ALcdPerspective()
  • Method Details

    • setOriginLat

      public void setOriginLat(double aLatitude)
      Description copied from interface: ILcdPerspective
      Sets the latitude of the origin to aLatitude.
      Specified by:
      setOriginLat in interface ILcdAzimuthal
      Specified by:
      setOriginLat in interface ILcdPerspective
      Parameters:
      aLatitude - The new originLat value.
      See Also:
    • setOriginLon

      public void setOriginLon(double aLongitude)
      Description copied from interface: ILcdPerspective
      Sets the longitude of the origin to aLongitude.
      Specified by:
      setOriginLon in interface ILcdAzimuthal
      Specified by:
      setOriginLon in interface ILcdPerspective
      Parameters:
      aLongitude - The new originLon value.
      See Also:
    • setOriginHeight

      public void setOriginHeight(double aHeight)
      Description copied from interface: ILcdPerspective
      Sets the height of the point of origin above the ellipsoid.
      Specified by:
      setOriginHeight in interface ILcdPerspective
      Parameters:
      aHeight - The new originHeight value.
      See Also:
    • setPerspectiveDistance

      public void setPerspectiveDistance(double aDistance)
      Description copied from interface: ILcdPerspective
      Sets the distance of the point of perspective from the center of the earth, divided by a, the semi-major axis.
      Specified by:
      setPerspectiveDistance in interface ILcdPerspective
      Parameters:
      aDistance - The new perspectiveDistance value.
      See Also:
    • getOrigin

      public ILcdPoint getOrigin()
      Description copied from interface: ILcdProjection
      Origin of the projection is the ILcd2DEditablePoint that corresponds with origin (0, 0) of the cartesian coordinate system of the projection.
      Specified by:
      getOrigin in interface ILcdProjection
      Returns:
      the origin of the projection.
    • getOriginLat

      public double getOriginLat()
      Description copied from interface: ILcdPerspective
      Gets the latitude of the origin of the projection.
      Specified by:
      getOriginLat in interface ILcdAzimuthal
      Specified by:
      getOriginLat in interface ILcdPerspective
      Returns:
      the latitude of the origin of the projection.
      See Also:
    • getOriginLon

      public double getOriginLon()
      Description copied from interface: ILcdPerspective
      Gets the longitude of the origin of the projection.
      Specified by:
      getOriginLon in interface ILcdAzimuthal
      Specified by:
      getOriginLon in interface ILcdPerspective
      Returns:
      the longitude of the origin of the projection.
      See Also:
    • getOriginHeight

      public double getOriginHeight()
      Description copied from interface: ILcdPerspective
      Gets the height of the point of origin above the ellipsoid.
      Specified by:
      getOriginHeight in interface ILcdPerspective
      Returns:
      the height of the point of origin above the ellipsoid.
      See Also:
    • getPerspectiveDistance

      public double getPerspectiveDistance()
      Description copied from interface: ILcdPerspective
      Gets the distance of the point of perspective from the center of the earth, divided by a , the semi-major axis.
      Specified by:
      getPerspectiveDistance in interface ILcdPerspective
      Returns:
      the distance of the point of perspective from the center of the earth, divided by a , the semi-major axis.
      See Also:
    • isContinuous

      public boolean isContinuous()
      Description copied from interface: ILcdProjection
      An ILcdProjection is continuous if there are no interruptions in the world coordinates. Most projections are continuous.
      Specified by:
      isContinuous in interface ILcdProjection
      Returns:
      true if the projection is continuous, false otherwise.
    • loadProperties

      public void loadProperties(String aPrefix, Properties aProperty) throws IllegalArgumentException
      Loads the 4 properties of an ALcdPerspective: the longitude and latitude and the height of the point of origin of the projection and the distance of the point of perspective. This method will, given aPrefix, analyze the aProperties object to set the properties of this ILcdPerspective. The values of following keys are retrieved:
      • <aPrefix><the name of the class that extends this abstract class>.originLat
      • <aPrefix><the name of the class that extends this abstract class>.originLon
      • <aPrefix><the name of the class that extends this abstract class>.perspectiveDistance
      • <aPrefix><the name of the class that extends this abstract class>.originHeight
      Specified by:
      loadProperties in interface ILcdProjection
      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)
      Writes the 4 properties of an ALcdPerspective: the longitude and latitude and the height of the point of origin of the projection and the distance of the point of perspective. This method will, given aPrefix, stores the properties of this ILcdPerspective analyze the aProperties object. The values of following keys are stored:
      • <aPrefix><the name of the class that extends this abstract class>.originLat
      • <aPrefix><the name of the class that extends this abstract class>.originLon
      • <aPrefix><the name of the class that extends this abstract class>.perspectiveDistance
      • <aPrefix><the name of the class that extends this abstract class>.originHeight
      Specified by:
      writePropertiesSFCT in interface ILcdProjection
      Parameters:
      aPrefix - prefix for the property names.
      aPropertySFCT - Properties object to store the serialized properties by side effect.
    • calculateCachedValues

      protected void calculateCachedValues()
      Constants based on the longitude, latitude, height of the point of origin of projection and the distance of the point of perspective 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.
    • hashCode

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

      public boolean equals(Object aObject)
      Description copied from interface: ILcdProjection
      Checks if this ILcdProjection equals some other Object.
      Specified by:
      equals in interface ILcdProjection
      Overrides:
      equals in class Object
      Parameters:
      aObject - 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.
    • 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 ALcdProjection
      Returns:
      deep clone of this ILcdProjection.