public class TLcdGeneralPerspective extends ALcdGeneralPerspective
The general perspective projection is an azimuthal projection using the origin of projection and the point of perspective. The origin height is taken into account. It is possible to tilt the projection plane.
ILcdProjection projection =
new TLcdGeneralPerspective(40.0, -100.0, 0.0, 2.0, 0.0, 0.0);
The equations of the general perspective projection are taken from [Snyder1987].
The point of perspective has to be outside the earth ellipsoid. So, its value should be outside the closed interval [-1.0,1.0].
fPropertyChangeDispatcher
EPSILON
Constructor and Description |
---|
TLcdGeneralPerspective()
Constructs a general perspective projection with the origin
at point
(0.0, 0.0, 0.0) , the perspective distance at 2.0,
the azimuth set to 0.0, and the tilt set to 0.0. |
TLcdGeneralPerspective(double aLongitude,
double aLatitude,
double aHeight,
double aPerspectiveDistance,
double aAzimuth,
double aTiltAngle)
Constructs a general perspective projection with the origin
at a point
(aLatitude, aLongitude, aHeight) . |
TLcdGeneralPerspective(ILcdPoint aOrigin,
double aPerspectiveDistance)
Constructs a general perspective projection with the origin at an
ILcdPoint aOrigin and a point of perspective at
a distance (divided by the semi-major axis) from the center of the earth. |
TLcdGeneralPerspective(ILcdPoint aOrigin,
double aPerspectiveDistance,
double aAzimuth,
double aTiltAngle)
Constructs a general perspective projection with the origin at an
ILcdPoint aOrigin and a point of perspective at
a distance (divided by the semi-major axis) from the center of the earth. |
Modifier and Type | Method and Description |
---|---|
double[][] |
boundaryLats(double lon)
Default implementation.
|
double[][] |
boundaryLons(double lat)
Default implementation.
|
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.
|
Object |
clone()
Makes a deep clone of this
ILcdProjection . |
boolean |
inLonLatBounds(ILcdPoint aLLP)
Checks if an
ILcdPoint is inside the valid area of geodetic
coordinates of the projection. |
boolean |
inWorldBoundsOnSphere(ILcdPoint aXYPoint,
double aRadius)
Checks if a
ILcdPoint is inside the valid cartesian area of
the projection. |
boolean |
isAllInBounds()
If all geodetic coordinates (l ,j ) are projected (visible) by an
ILcdProjection
and all (x,y ) coordinates are bounded this is true . |
void |
lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aWorldPoint)
Default implementation calls
lonlatheight2worldOnEllipsoidSFCT
with aEllipsoid.getAuxRadius() as sphere radius. |
void |
lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP,
double aRadius,
ILcd2DEditablePoint aWorldPoint)
Transforms an
ILcd2DEditablePoint on a sphere into the
cartesian coordinate system of the projection. |
String |
toString()
Returns the
String representation of the general perspective projection. |
void |
world2DEditableBoundsOnSphereSFCT(double aRadius,
ILcd2DEditableBounds aWorldBound)
The projection is bounded when the perspective distance is outside the
closed interval [-1,1].
|
void |
world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aLLPSFCT)
Transforms a world point to a LonLatHeightPoint.
|
void |
world2lonlatOnSphereSFCT(ILcdPoint aXYPoint,
double aRadius,
ILcd2DEditablePoint aLLPSFCT)
Transforms an
ILcdPoint from the cartesian coordinate system
of the projection into an ILcd2DEditablePoint onto a sphere. |
equals, getAzimuth, getOrigin, getOriginHeight, getOriginLat, getOriginLon, getPerspectiveDistance, getTilt, hashCode, isContinuous, loadProperties, setAzimuth, setOriginHeight, setOriginLat, setOriginLon, setPerspectiveDistance, setTilt, writePropertiesSFCT
addPropertyChangeListener, firePropertyChangeEvent, inWorldBoundsOnEllipsoid, removePropertyChangeListener, world2DEditableBoundsOnEllipsoidSFCT
finalize, getClass, notify, notifyAll, wait, wait, wait
inWorldBoundsOnEllipsoid, world2DEditableBoundsOnEllipsoidSFCT
addPropertyChangeListener, removePropertyChangeListener
public TLcdGeneralPerspective()
(0.0, 0.0, 0.0)
, the perspective distance at 2.0,
the azimuth set to 0.0, and the tilt set to 0.0.public TLcdGeneralPerspective(double aLongitude, double aLatitude, double aHeight, double aPerspectiveDistance, double aAzimuth, double aTiltAngle)
(aLatitude, aLongitude, aHeight)
.aLongitude
- longitude of the origin of the projection,
in decimal degrees.aLatitude
- latitude of the origin of the projection,
in decimal degrees.aHeight
- height of the origin point above the ellipsoid.aPerspectiveDistance
- distance of the point of perspective
from the center of the earth globe divided by the semi-major axis.aAzimuth
- azimuth east of north of the Y-axis of the Y_t axis of
the tilted plane of projectionaTiltAngle
- upward angle of tilt, or the angle between the Y_t axis
and the tangent plane, expressed in degreespublic TLcdGeneralPerspective(ILcdPoint aOrigin, double aPerspectiveDistance)
ILcdPoint
aOrigin
and a point of perspective at
a distance (divided by the semi-major axis) from the center of the earth.
The properties azimuth and tiltAngle are set to zero.aOrigin
- point of origin (3D) of the projection.aPerspectiveDistance
- distance of the point of perspective
from the center of the earth globe divided by the semi-major axis.public TLcdGeneralPerspective(ILcdPoint aOrigin, double aPerspectiveDistance, double aAzimuth, double aTiltAngle)
ILcdPoint
aOrigin
and a point of perspective at
a distance (divided by the semi-major axis) from the center of the earth.aOrigin
- point of origin (3D) of the projection.aPerspectiveDistance
- distance of the point of perspective
from the center of the earth globe divided by the semi-major axis.aAzimuth
- azimuth east of north of the Y-axis of the Y_t axis of
the tilted plane of projectionaTiltAngle
- upward angle of tilt, or the angle between the Y_t axis
and the tangent plane, expressed in degreesprotected void calculateCachedValues()
ALcdGeneralPerspective
calculateCachedValues
in class ALcdGeneralPerspective
public boolean isAllInBounds()
ILcdProjection
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.true
if all LonLatPoints are within the bounds of
the projection, false
otherwise.public void lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aWorldPoint) throws TLcdOutOfBoundsException
ILcdProjection
ILcd2DEditablePoint
on a sphere into the
cartesian coordinate system of the projection.aLLHP
- point to be projected.aRadius
- radius of the sphere (meters).aWorldPoint
- projected point as side effect.TLcdOutOfBoundsException
- If the
ILcdPoint
aLLHP
is not within the valid area
of the projection (visible area), then this exception is thrown.public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aWorldPoint) throws TLcdOutOfBoundsException
ALcdProjection
lonlatheight2worldOnEllipsoidSFCT
with aEllipsoid.getAuxRadius()
as sphere radius.lonlatheight2worldOnEllipsoidSFCT
in interface ILcdProjection
lonlatheight2worldOnEllipsoidSFCT
in class ALcdProjection
aLLHP
- point to be projected.aEllipsoid
- ellipsoid on which the point is defined.aWorldPoint
- projected point as side effect.TLcdOutOfBoundsException
- If the
ILcdPoint
aLLHP
is not within the valid area
of the projection (visible area), then this exception is thrown.public void world2lonlatOnSphereSFCT(ILcdPoint aXYPoint, double aRadius, ILcd2DEditablePoint aLLPSFCT) throws TLcdOutOfBoundsException
ILcdProjection
ILcdPoint
from the cartesian coordinate system
of the projection into an ILcd2DEditablePoint
onto a sphere.aXYPoint
- projected point for which the corresponding geodetic point is sought.aRadius
- radius of the sphere (meters).aLLPSFCT
- resulting geodetic coordinate as side effect.TLcdOutOfBoundsException
- If the
ILcdPoint
aXYPoint
is not within the valid
area of the projection (visible area), then this exception is thrown.public void world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPSFCT) throws TLcdOutOfBoundsException
aLLPSFCT
.world2lonlatOnEllipsoidSFCT
in interface ILcdProjection
world2lonlatOnEllipsoidSFCT
in class ALcdProjection
aXYPoint
- projected point for which the corresponding geodetic point is sought.aEllipsoid
- ellipsoid on which the geodetic coordinate is defined.aLLPSFCT
- resulting geodetic coordinate as side effect.TLcdOutOfBoundsException
- If the
ILcdPoint
aXYPoint
is not within the valid
area of the projection (visible area), then this exception is thrown.public boolean inLonLatBounds(ILcdPoint aLLP)
ILcdProjection
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.aLLP
- ILcdPoint
to be checked upon.true
if valid, false
if invalid.public double[][] boundaryLons(double lat)
ALcdProjection
boundaryLons
in interface ILcdProjection
boundaryLons
in class ALcdProjection
lat
- latitude in decimal degrees and -90.0 <= aLat
<= 90.0.public double[][] boundaryLats(double lon)
ALcdProjection
boundaryLats
in interface ILcdProjection
boundaryLats
in class ALcdProjection
lon
- longitude in decimal degrees -180.0 <= lon <= 180.0 .public void world2DEditableBoundsOnSphereSFCT(double aRadius, ILcd2DEditableBounds aWorldBound)
aRadius
- radius of the sphere.aWorldBound
- the bounds of the projection in world coordinates as side effect.public boolean inWorldBoundsOnSphere(ILcdPoint aXYPoint, double aRadius)
ILcdProjection
ILcdPoint
is inside the valid cartesian area of
the projection. The valid cartesian area is determined naturally by the
projection bounds or by an artificial introduced boundary limit because
some cartesian points are at infinity. The shape of the valid cartesian
area is in many cases rectangular or circular although it might be more
complex.aXYPoint
- point to be checked upon.aRadius
- radius of the sphere.true
if valid, false
if invalid.public String toString()
String
representation of the general perspective projection.toString
in interface ILcdProjection
toString
in class Object
String
representation of the general perspective projection.public Object clone()
ILcdProjection
ILcdProjection
.clone
in interface ILcdProjection
clone
in class ALcdGeneralPerspective
ILcdProjection
.