Package com.luciad.projection
Class ALcdGeneralPerspective
java.lang.Object
com.luciad.projection.ALcdProjection
com.luciad.projection.ALcdGeneralPerspective
- All Implemented Interfaces:
ILcdGeneralPerspective
,ILcdProjection
,ILcdPropertyChangeSource
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdGeneralPerspective
public abstract class ALcdGeneralPerspective
extends ALcdProjection
implements ILcdGeneralPerspective, Cloneable
ALcdGeneralPerspective
are ILcdProjection
objects
that have a central point of zero distortion. This central point is the
origin of the ALcdGeneralPerspective
.
An ALcdGeneralPerspective
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:
-
Field Summary
Fields inherited from class com.luciad.projection.ALcdProjection
fPropertyChangeDispatcher
Fields inherited from interface com.luciad.projection.ILcdProjection
EPSILON
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
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.clone()
Makes a deep clone of thisILcdProjection
.boolean
Checks if thisILcdProjection
equals some other Object.double
Returns the azimuth east of north of the Y-axis, the most upward-tilted axis of the plane of projection in degrees.Origin of the projection is theILcd2DEditablePoint
that corresponds with origin (0, 0) of the cartesian coordinate system of the projection.double
Gets the height of the point of origin above the ellipsoid.double
Gets the latitude of the origin of the projection.double
Gets the longitude of the origin of the projection.double
Gets the distance of the point of perspective from the center of the earth, divided by a , the semi-major axis.double
getTilt()
Returns the upward angle of tilt, or the angle between the Y_t axis and the tangent plane in degrees.int
hashCode()
boolean
AnILcdProjection
is continuous if there are no interruptions in the world coordinates.void
loadProperties
(String aPrefix, Properties aProperty) Loads the 4 properties of anALcdGeneralPerspective
: the longitude and latitude and the height of the point of origin of the projection and the distance of the point of perspective.void
setAzimuth
(double aAzimuth) Sets the azimuth east of north of the Y-axis, the most upward-tilted axis of the plane of projection.void
setOriginHeight
(double aHeight) Sets the height of the point of origin above the ellipsoid.void
setOriginLat
(double aLatitude) Sets the latitude of the origin toaLatitude
.void
setOriginLon
(double aLongitude) Sets the longitude of the origin toaLongitude
.void
setPerspectiveDistance
(double aDistance) Sets the distance of the point of perspective from the center of the earth, divided by a, the semi-major axis.void
setTilt
(double aTiltAngle) Sets the upward angle of tilt, or the angle between the Y_t axis and the tangent plane.void
writePropertiesSFCT
(String aPrefix, Properties aPropertySFCT) Writes the 4 properties of anALcdGeneralPerspective
: the longitude and latitude and the height of the point of origin of the projection and the distance of the point of perspective.Methods inherited from class com.luciad.projection.ALcdProjection
addPropertyChangeListener, boundaryLats, boundaryLons, firePropertyChangeEvent, inWorldBoundsOnEllipsoid, lonlatheight2worldOnEllipsoidSFCT, removePropertyChangeListener, world2DEditableBoundsOnEllipsoidSFCT, world2lonlatOnEllipsoidSFCT
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.projection.ILcdProjection
boundaryLats, boundaryLons, inLonLatBounds, inWorldBoundsOnEllipsoid, inWorldBoundsOnSphere, isAllInBounds, lonlatheight2worldOnEllipsoidSFCT, lonlatheight2worldOnSphereSFCT, toString, world2DEditableBoundsOnEllipsoidSFCT, world2DEditableBoundsOnSphereSFCT, world2lonlatOnEllipsoidSFCT, world2lonlatOnSphereSFCT
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
ALcdGeneralPerspective
public ALcdGeneralPerspective()
-
-
Method Details
-
setOriginLat
public void setOriginLat(double aLatitude) Description copied from interface:ILcdGeneralPerspective
Sets the latitude of the origin toaLatitude
.- Specified by:
setOriginLat
in interfaceILcdGeneralPerspective
- Parameters:
aLatitude
- The new originLat value.- See Also:
-
setOriginLon
public void setOriginLon(double aLongitude) Description copied from interface:ILcdGeneralPerspective
Sets the longitude of the origin toaLongitude
.- Specified by:
setOriginLon
in interfaceILcdGeneralPerspective
- Parameters:
aLongitude
- The new originLon value.- See Also:
-
setOriginHeight
public void setOriginHeight(double aHeight) Description copied from interface:ILcdGeneralPerspective
Sets the height of the point of origin above the ellipsoid.- Specified by:
setOriginHeight
in interfaceILcdGeneralPerspective
- Parameters:
aHeight
- The new originHeight value.- See Also:
-
setPerspectiveDistance
public void setPerspectiveDistance(double aDistance) Description copied from interface:ILcdGeneralPerspective
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 interfaceILcdGeneralPerspective
- Parameters:
aDistance
- The new perspectiveDistance value.- See Also:
-
setAzimuth
public void setAzimuth(double aAzimuth) Description copied from interface:ILcdGeneralPerspective
Sets the azimuth east of north of the Y-axis, the most upward-tilted axis of the plane of projection. The Y_t axis is oriented at azimuthaAzimuth
rather than due north.- Specified by:
setAzimuth
in interfaceILcdGeneralPerspective
- Parameters:
aAzimuth
- The new azimuth value in degrees.- See Also:
-
setTilt
public void setTilt(double aTiltAngle) Description copied from interface:ILcdGeneralPerspective
Sets the upward angle of tilt, or the angle between the Y_t axis and the tangent plane.- Specified by:
setTilt
in interfaceILcdGeneralPerspective
- Parameters:
aTiltAngle
- The new tilt value, in degrees- See Also:
-
getOrigin
Description copied from interface:ILcdProjection
Origin of the projection is theILcd2DEditablePoint
that corresponds with origin (0, 0) of the cartesian coordinate system of the projection.- Specified by:
getOrigin
in interfaceILcdProjection
- Returns:
- the origin of the projection.
-
getOriginLat
public double getOriginLat()Description copied from interface:ILcdGeneralPerspective
Gets the latitude of the origin of the projection.- Specified by:
getOriginLat
in interfaceILcdGeneralPerspective
- Returns:
- the latitude of the origin of the projection.
- See Also:
-
getOriginLon
public double getOriginLon()Description copied from interface:ILcdGeneralPerspective
Gets the longitude of the origin of the projection.- Specified by:
getOriginLon
in interfaceILcdGeneralPerspective
- Returns:
- the longitude of the origin of the projection.
- See Also:
-
getOriginHeight
public double getOriginHeight()Description copied from interface:ILcdGeneralPerspective
Gets the height of the point of origin above the ellipsoid.- Specified by:
getOriginHeight
in interfaceILcdGeneralPerspective
- Returns:
- the height of the point of origin above the ellipsoid.
- See Also:
-
getPerspectiveDistance
public double getPerspectiveDistance()Description copied from interface:ILcdGeneralPerspective
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 interfaceILcdGeneralPerspective
- Returns:
- the distance of the point of perspective from the center of the earth, divided by a , the semi-major axis.
- See Also:
-
getAzimuth
public double getAzimuth()Description copied from interface:ILcdGeneralPerspective
Returns the azimuth east of north of the Y-axis, the most upward-tilted axis of the plane of projection in degrees.- Specified by:
getAzimuth
in interfaceILcdGeneralPerspective
- Returns:
- the azimuth of the azimuth east of north of the Y-axis in degrees.
- See Also:
-
getTilt
public double getTilt()Description copied from interface:ILcdGeneralPerspective
Returns the upward angle of tilt, or the angle between the Y_t axis and the tangent plane in degrees.- Specified by:
getTilt
in interfaceILcdGeneralPerspective
- Returns:
- the angle between the Y_t axis and the tangent plane in degrees.
- See Also:
-
isContinuous
public boolean isContinuous()Description copied from interface:ILcdProjection
AnILcdProjection
is continuous if there are no interruptions in the world coordinates. Most projections are continuous.- Specified by:
isContinuous
in interfaceILcdProjection
- Returns:
true
if the projection is continuous,false
otherwise.
-
loadProperties
Loads the 4 properties of anALcdGeneralPerspective
: 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 theaProperties
object to set the properties of thisILcdGeneralPerspective
. 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 interfaceILcdProjection
- Parameters:
aPrefix
- prefix of the property names.aProperty
- Properties object containing the serialized properties.- Throws:
IllegalArgumentException
- if the projection cannot be created.
-
writePropertiesSFCT
Writes the 4 properties of anALcdGeneralPerspective
: 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, store the properties of thisILcdGeneralPerspective
into theaProperties
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 interfaceILcdProjection
- 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() -
equals
Description copied from interface:ILcdProjection
Checks if thisILcdProjection
equals some other Object.- Specified by:
equals
in interfaceILcdProjection
- Overrides:
equals
in classObject
- 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
Description copied from interface:ILcdProjection
Makes a deep clone of thisILcdProjection
.- Specified by:
clone
in interfaceILcdProjection
- Overrides:
clone
in classALcdProjection
- Returns:
- deep clone of this
ILcdProjection
.
-