Package com.luciad.projection
Interface ILcdProjection
- All Superinterfaces:
ILcdPropertyChangeSource
,Serializable
- All Known Subinterfaces:
ILcdAzimuthal
,ILcdConic
,ILcdCylindrical
,ILcdGeneralPerspective
,ILcdObliqueCylindrical
,ILcdPerspective
,ILcdRectifiedProjection
,ILcdTransverseCylindrical
- All Known Implementing Classes:
ALcdAzimuthal
,ALcdConic
,ALcdCylindrical
,ALcdGeneralPerspective
,ALcdObliqueCylindrical
,ALcdPerspective
,ALcdProjection
,ALcdTransverseCylindrical
,TLcdAlbersEqualAreaConic
,TLcdAzimuthalEquidistant
,TLcdCassini
,TLcdCassiniSoldner
,TLcdDutchStereographic
,TLcdEckertIV
,TLcdEckertVI
,TLcdEllipsoidalEquidistantCylindrical
,TLcdEllipsoidalLambertAzimuthalEqualArea
,TLcdEquidistantCylindrical
,TLcdGeneralPerspective
,TLcdGeodetic
,TLcdGnomonic
,TLcdKrovak
,TLcdLambertAzimuthalEqualArea
,TLcdLambertConformal
,TLcdMercator
,TLcdMillerCylindrical
,TLcdMollweide
,TLcdObliqueMercator
,TLcdOrthographic
,TLcdOrthorectifiedProjection
,TLcdPerspectiveProjection
,TLcdPolarStereographic
,TLcdPolyconic
,TLcdPseudoMercator
,TLcdRectifiedPolynomialProjection
,TLcdRectifiedProjectiveProjection
,TLcdRectifiedRationalProjection
,TLcdRPCProjection
,TLcdSimpleRectangular
,TLcdStereographic
,TLcdSwissObliqueMercator
,TLcdTransverseMercator
,TLcdTransverseMercatorSPCS
,TLcdVerticalPerspective
An
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)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
The constantEPSILON
is used for two purposes. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
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.clone()
Makes a deep clone of thisILcdProjection
.boolean
Checks if thisILcdProjection
equals some other Object.Origin of the projection is theILcd2DEditablePoint
that corresponds with origin (0, 0) of the cartesian coordinate system of the projection.boolean
inLonLatBounds
(ILcdPoint aLLHP) Checks if anILcdPoint
is inside the valid area of geodetic coordinates of the projection.boolean
inWorldBoundsOnEllipsoid
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid) Checks if aILcdPoint
is inside the valid cartesian area of the projection.boolean
inWorldBoundsOnSphere
(ILcdPoint aXYPoint, double aRadius) Checks if aILcdPoint
is inside the valid cartesian area of the projection.boolean
If all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjection
and all (x,y ) coordinates are bounded this istrue
.boolean
AnILcdProjection
is continuous if there are no interruptions in the world coordinates.void
loadProperties
(String aPrefix, Properties aProperties) The properties of anILcdProjection
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 anILcdPoint
on anILcdEllipsoid
into the cartesian coordinate system of the projection.void
lonlatheight2worldOnSphereSFCT
(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aXYPointSFCT) Transforms anILcd2DEditablePoint
on a sphere into the cartesian coordinate system of the projection.toString()
String representation of thisILcdProjection
.void
world2DEditableBoundsOnEllipsoidSFCT
(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBounds) Sets theILcd2DEditableBounds
object to the bounds of the projection in world coordinates.void
world2DEditableBoundsOnSphereSFCT
(double aRadius, ILcd2DEditableBounds aWorldBounds) Sets theILcd2DEditableBounds
object to the bounds of the projection in world coordinates.void
world2lonlatOnEllipsoidSFCT
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) Transforms anILcdPoint
from the cartesian coordinate system of the projection into anILcd2DEditablePoint
onto anILcdEllipsoid
.void
world2lonlatOnSphereSFCT
(ILcdPoint aXYPoint, double aRadius, ILcd2DEditablePoint aLLPointSFCT) Transforms anILcdPoint
from the cartesian coordinate system of the projection into anILcd2DEditablePoint
onto a sphere.void
writePropertiesSFCT
(String aPrefix, Properties aPropertiesSFCT) The properties of anILcdProjection
determine the projection parameters that determine the plane, cylinder or cone on which the projection is done.Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Field Details
-
EPSILON
static final double EPSILONThe constantEPSILON
is used for two purposes.- It serves as a safety measure for numerical rounding and approximation errors. When the grid is painted with a certain projection it asks for the boundaries of the projection used. However, some of these boundaries are determined from the projection formulas for the sphere while in general the projection formulas of the ellipsoid are used. This can introduce some approximation errors that may lead to out of bounds exceptions. When this happens the grid line would not be painted. Even if one is able to calculate the exact boundaries of the projection this out of bounds exception might occur. Rounding errors might cause exact boundary points to be considered out of bounds.
- The
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.
- See Also:
-
-
Method Details
-
loadProperties
The properties of anILcdProjection
determine the projection parameters that determine the plane, cylinder or cone on which the projection is done. The properties of anILcdProjection
are of course dependent on the projection. A common property for allILcdprojection
objects is the origin of the projection. Other, more specific, properties are standard parallels, azimuthal direction, perspective distance, ... .- Parameters:
aPrefix
- prefix for property names.aProperties
- Properties object containing the serialized projection.
-
writePropertiesSFCT
The properties of anILcdProjection
determine the projection parameters that determine the plane, cylinder or cone on which the projection is done. The properties of anILcdProjection
are of course dependent on the projection. A common property for allILcdprojection
objects is the origin of the projection. Other, more specific, properties are standard parallels, azimuthal direction, perspective distance, ... .- Parameters:
aPrefix
- prefix for property names.aPropertiesSFCT
- Properties object in which to store the serialized projection properties as side effect.
-
isAllInBounds
boolean isAllInBounds()If all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjection
and all (x,y ) coordinates are bounded this istrue
. AllILcdProjection
objects have bounded (x,y ) coordinates because the projection is cut off if necessary.- Returns:
true
if all LonLatPoints are within the bounds of the projection,false
otherwise.
-
isContinuous
boolean isContinuous()AnILcdProjection
is continuous if there are no interruptions in the world coordinates. Most projections are continuous.- Returns:
true
if the projection is continuous,false
otherwise.
-
getOrigin
ILcdPoint getOrigin()Origin of the projection is theILcd2DEditablePoint
that corresponds with origin (0, 0) of the cartesian coordinate system of the projection.- Returns:
- the origin of the projection.
-
lonlatheight2worldOnSphereSFCT
void lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException Transforms anILcd2DEditablePoint
on a sphere into the cartesian coordinate system of the projection.- Parameters:
aLLHP
- point to be projected.aRadius
- radius of the sphere (meters).aXYPointSFCT
- projected point as side effect.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aLLHP
is not within the valid area of the projection (visible area), then this exception is thrown.
-
lonlatheight2worldOnEllipsoidSFCT
void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException Transforms anILcdPoint
on anILcdEllipsoid
into the cartesian coordinate system of the projection.- Parameters:
aLLHP
- point to be projected.aEllipsoid
- ellipsoid on which the point is defined.aXYPointSFCT
- projected point as side effect.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aLLHP
is not within the valid area of the projection (visible area), then this exception is thrown.
-
world2lonlatOnSphereSFCT
void world2lonlatOnSphereSFCT(ILcdPoint aXYPoint, double aRadius, ILcd2DEditablePoint aLLPointSFCT) throws TLcdOutOfBoundsException Transforms anILcdPoint
from the cartesian coordinate system of the projection into anILcd2DEditablePoint
onto a sphere.- Parameters:
aXYPoint
- projected point for which the corresponding geodetic point is sought.aRadius
- radius of the sphere (meters).aLLPointSFCT
- resulting geodetic coordinate as side effect.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aXYPoint
is not within the valid area of the projection (visible area), then this exception is thrown.
-
world2lonlatOnEllipsoidSFCT
void world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) throws TLcdOutOfBoundsException Transforms anILcdPoint
from the cartesian coordinate system of the projection into anILcd2DEditablePoint
onto anILcdEllipsoid
.- 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 theILcdPoint
aXYPoint
is not within the valid area of the projection (visible area), then this exception is thrown.
-
inLonLatBounds
Checks if anILcdPoint
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.- Parameters:
aLLHP
-ILcdPoint
to be checked upon.- Returns:
true
if valid,false
if invalid.
-
inWorldBoundsOnSphere
Checks if aILcdPoint
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.- Parameters:
aXYPoint
- point to be checked upon.aRadius
- radius of the sphere.- Returns:
true
if valid,false
if invalid.
-
inWorldBoundsOnEllipsoid
Checks if aILcdPoint
is inside the valid cartesian area of the projection.- 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:
-
world2DEditableBoundsOnSphereSFCT
Sets theILcd2DEditableBounds
object to the bounds of the projection in world coordinates.- Parameters:
aRadius
- radius of the sphere.aWorldBounds
- the bounds of the projection in world coordinates as side effect.
-
world2DEditableBoundsOnEllipsoidSFCT
void world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBounds) Sets theILcd2DEditableBounds
object to the bounds of the projection in world coordinates.- Parameters:
aEllipsoid
- ellipsoid considered.aWorldBounds
- the bounds of the projection in world coordinates as side effect.
-
boundaryLons
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.- Parameters:
aLatitude
- 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
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.- Parameters:
aLongitude
- 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 .
-
toString
String toString()String representation of thisILcdProjection
. -
clone
Object clone()Makes a deep clone of thisILcdProjection
.- Returns:
- deep clone of this
ILcdProjection
.
-
equals
Checks if thisILcdProjection
equals some other Object.
-