public interface ILcdProjection extends Serializable, ILcdPropertyChangeSource
ILcdProjection
is a map projection. ILcdProjection
objects transform geodetic coordinates (longitude-latitude-height) to world
coordinates (x-y) and vice versa. The inverse transformation transforms a
(x,y) point to a (lon,lat,height) point by taking the height of the
input/output parameter (lon,lat,height).
The origin of the ILcdProjection
is a lat-lon point and
corresponds to the (0,0) origin of the cartesian coordinate system of the
projection.
An ILcdProjection
has zero or more
java.beans.PropertyChangeListeners associated to it. The ILcdProjection
sends a java.beans.PropertyChangeEvent whenever the state of the ILcdProjection
changes. (Listener pattern)
Modifier and Type | Field and Description |
---|---|
static double |
EPSILON
The constant
EPSILON is used for two purposes. |
Modifier and Type | Method and Description |
---|---|
double[][] |
boundaryLats(double aLongitude)
Calculates an array of latitude pairs for a given longitude that are at the
boundary of the valid area of the transformation of the projection.
|
double[][] |
boundaryLons(double aLatitude)
Calculates an array of longitude pairs for a given latitude that are at the
boundary of the valid area of the transformation of the projection.
|
Object |
clone()
Makes a deep clone of this
ILcdProjection . |
boolean |
equals(Object aProjection)
Checks if this
ILcdProjection equals some other Object. |
ILcdPoint |
getOrigin()
Origin of the projection is the
ILcd2DEditablePoint that
corresponds with origin (0, 0) of the cartesian coordinate system of the
projection. |
boolean |
inLonLatBounds(ILcdPoint aLLHP)
Checks if an
ILcdPoint is inside the valid area of geodetic
coordinates of the projection. |
boolean |
inWorldBoundsOnEllipsoid(ILcdPoint aXYPoint,
ILcdEllipsoid aEllipsoid)
Checks if a
ILcdPoint is inside the valid cartesian area 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 . |
boolean |
isContinuous()
An
ILcdProjection is continuous if there are no interruptions
in the world coordinates. |
void |
loadProperties(String aPrefix,
Properties aProperties)
The properties of an
ILcdProjection determine the projection
parameters that determine the plane, cylinder or cone on which the
projection is done. |
void |
lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aXYPointSFCT)
Transforms an
ILcdPoint on an ILcdEllipsoid into
the cartesian coordinate system of the projection. |
void |
lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP,
double aRadius,
ILcd2DEditablePoint aXYPointSFCT)
Transforms an
ILcd2DEditablePoint on a sphere into the
cartesian coordinate system of the projection. |
String |
toString()
String representation of this
ILcdProjection . |
void |
world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid,
ILcd2DEditableBounds aWorldBounds)
Sets the
ILcd2DEditableBounds object to the bounds of the projection
in world coordinates. |
void |
world2DEditableBoundsOnSphereSFCT(double aRadius,
ILcd2DEditableBounds aWorldBounds)
Sets the
ILcd2DEditableBounds object to the bounds of the projection
in world coordinates. |
void |
world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aLLPointSFCT)
Transforms an
ILcdPoint from the cartesian coordinate system
of the projection into an ILcd2DEditablePoint onto an ILcdEllipsoid . |
void |
world2lonlatOnSphereSFCT(ILcdPoint aXYPoint,
double aRadius,
ILcd2DEditablePoint aLLPointSFCT)
Transforms an
ILcdPoint from the cartesian coordinate system
of the projection into an ILcd2DEditablePoint onto a sphere. |
void |
writePropertiesSFCT(String aPrefix,
Properties aPropertiesSFCT)
The properties of an
ILcdProjection determine the projection
parameters that determine the plane, cylinder or cone on which the
projection is done. |
addPropertyChangeListener, removePropertyChangeListener
static final double EPSILON
EPSILON
is used for two purposes.
ILcdProjection
provides the grid painter with
information about the boundary longitudes for a certain latitude. If the
whole interval [-180,180] is visible, there will be unwanted lines drawn.
This is due to the fact that the longitude -180 is exactly the same as
the longitude 180 whereas this same point is visible twice (at two sides
of the projection plane). We prevent drawing a line from one side of the
screen to the other side of the screen by narrowing the longitude
interval.
void loadProperties(String aPrefix, Properties aProperties)
ILcdProjection
determine the projection
parameters that determine the plane, cylinder or cone on which the
projection is done. The properties of an ILcdProjection
are of
course dependent on the projection. A common property for all ILcdprojection
objects is the origin of the projection. Other, more specific, properties
are standard parallels, azimuthal direction, perspective distance, ... .aPrefix
- prefix for property names.aProperties
- Properties object containing the serialized projection.void writePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT)
ILcdProjection
determine the projection
parameters that determine the plane, cylinder or cone on which the
projection is done. The properties of an ILcdProjection
are of
course dependent on the projection. A common property for all ILcdprojection
objects is the origin of the projection. Other, more specific, properties
are standard parallels, azimuthal direction, perspective distance,
... .aPrefix
- prefix for property names.aPropertiesSFCT
- Properties object in which to store the serialized
projection properties as side effect.boolean isAllInBounds()
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.boolean isContinuous()
ILcdProjection
is continuous if there are no interruptions
in the world coordinates. Most projections are continuous.true
if the projection is continuous,
false
otherwise.ILcdPoint getOrigin()
ILcd2DEditablePoint
that
corresponds with origin (0, 0) of the cartesian coordinate system of the
projection.void lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
ILcd2DEditablePoint
on a sphere into the
cartesian coordinate system of the projection.aLLHP
- point to be projected.aRadius
- radius of the sphere (meters).aXYPointSFCT
- 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.void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException
ILcdPoint
on an ILcdEllipsoid
into
the cartesian coordinate system of the projection.aLLHP
- point to be projected.aEllipsoid
- ellipsoid on which the point is defined.aXYPointSFCT
- 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.void world2lonlatOnSphereSFCT(ILcdPoint aXYPoint, double aRadius, ILcd2DEditablePoint aLLPointSFCT) throws TLcdOutOfBoundsException
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).aLLPointSFCT
- 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.void world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) throws TLcdOutOfBoundsException
ILcdPoint
from the cartesian coordinate system
of the projection into an ILcd2DEditablePoint
onto an ILcdEllipsoid
.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.TLcdOutOfBoundsException
- If the
ILcdPoint
aXYPoint
is not within the valid
area of the projection (visible area), then this exception is thrown.boolean inLonLatBounds(ILcdPoint aLLHP)
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.aLLHP
- ILcdPoint
to be checked upon.true
if valid, false
if invalid.boolean inWorldBoundsOnSphere(ILcdPoint aXYPoint, double aRadius)
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.boolean inWorldBoundsOnEllipsoid(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid)
ILcdPoint
is inside the valid cartesian area of
the projection.aXYPoint
- point to be checked upon.aEllipsoid
- ellipsoid on which the geodetic coordinate is defined.true
if valid, false
if invalid.inWorldBoundsOnSphere(com.luciad.shape.ILcdPoint, double)
void world2DEditableBoundsOnSphereSFCT(double aRadius, ILcd2DEditableBounds aWorldBounds)
ILcd2DEditableBounds
object to the bounds of the projection
in world coordinates.aRadius
- radius of the sphere.aWorldBounds
- the bounds of the projection in world coordinates as side effect.void world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBounds)
ILcd2DEditableBounds
object to the bounds of the projection
in world coordinates.aEllipsoid
- ellipsoid considered.aWorldBounds
- the bounds of the projection in world coordinates as side effect.double[][] boundaryLons(double aLatitude)
aLatitude
- latitude in decimal degrees and -90.0 <= aLat
<= 90.0.double[][] boundaryLats(double aLongitude)
aLongitude
- longitude in decimal degrees -180.0 <= lon <= 180.0 .String toString()
ILcdProjection
.Object clone()
ILcdProjection
.ILcdProjection
.boolean equals(Object aProjection)
ILcdProjection
equals some other Object.