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
FieldsModifier and TypeFieldDescriptionstatic final doubleThe constantEPSILONis 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.booleanChecks if thisILcdProjectionequals some other Object.Origin of the projection is theILcd2DEditablePointthat corresponds with origin (0, 0) of the cartesian coordinate system of the projection.booleaninLonLatBounds(ILcdPoint aLLHP) Checks if anILcdPointis inside the valid area of geodetic coordinates of the projection.booleaninWorldBoundsOnEllipsoid(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid) Checks if aILcdPointis inside the valid cartesian area of the projection.booleaninWorldBoundsOnSphere(ILcdPoint aXYPoint, double aRadius) Checks if aILcdPointis inside the valid cartesian area of the projection.booleanIf all geodetic coordinates (l ,j ) are projected (visible) by anILcdProjectionand all (x,y ) coordinates are bounded this istrue.booleanAnILcdProjectionis continuous if there are no interruptions in the world coordinates.voidloadProperties(String aPrefix, Properties aProperties) The properties of anILcdProjectiondetermine the projection parameters that determine the plane, cylinder or cone on which the projection is done.voidlonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) Transforms anILcdPointon anILcdEllipsoidinto the cartesian coordinate system of the projection.voidlonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aXYPointSFCT) Transforms anILcd2DEditablePointon a sphere into the cartesian coordinate system of the projection.toString()String representation of thisILcdProjection.voidworld2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBounds) Sets theILcd2DEditableBoundsobject to the bounds of the projection in world coordinates.voidworld2DEditableBoundsOnSphereSFCT(double aRadius, ILcd2DEditableBounds aWorldBounds) Sets theILcd2DEditableBoundsobject to the bounds of the projection in world coordinates.voidworld2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPointSFCT) Transforms anILcdPointfrom the cartesian coordinate system of the projection into anILcd2DEditablePointonto anILcdEllipsoid.voidworld2lonlatOnSphereSFCT(ILcdPoint aXYPoint, double aRadius, ILcd2DEditablePoint aLLPointSFCT) Transforms anILcdPointfrom the cartesian coordinate system of the projection into anILcd2DEditablePointonto a sphere.voidwritePropertiesSFCT(String aPrefix, Properties aPropertiesSFCT) The properties of anILcdProjectiondetermine 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 constantEPSILONis 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
ILcdProjectionprovides 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 anILcdProjectiondetermine the projection parameters that determine the plane, cylinder or cone on which the projection is done. The properties of anILcdProjectionare of course dependent on the projection. A common property for allILcdprojectionobjects 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 anILcdProjectiondetermine the projection parameters that determine the plane, cylinder or cone on which the projection is done. The properties of anILcdProjectionare of course dependent on the projection. A common property for allILcdprojectionobjects 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 anILcdProjectionand all (x,y ) coordinates are bounded this istrue. AllILcdProjectionobjects have bounded (x,y ) coordinates because the projection is cut off if necessary.- Returns:
trueif all LonLatPoints are within the bounds of the projection,falseotherwise.
-
isContinuous
boolean isContinuous()AnILcdProjectionis continuous if there are no interruptions in the world coordinates. Most projections are continuous.- Returns:
trueif the projection is continuous,falseotherwise.
-
getOrigin
ILcdPoint getOrigin()Origin of the projection is theILcd2DEditablePointthat 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 anILcd2DEditablePointon 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 theILcdPointaLLHPis 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 anILcdPointon anILcdEllipsoidinto 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 theILcdPointaLLHPis 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 anILcdPointfrom the cartesian coordinate system of the projection into anILcd2DEditablePointonto 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 theILcdPointaXYPointis 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 anILcdPointfrom the cartesian coordinate system of the projection into anILcd2DEditablePointonto 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 theILcdPointaXYPointis not within the valid area of the projection (visible area), then this exception is thrown.
-
inLonLatBounds
Checks if anILcdPointis 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-ILcdPointto be checked upon.- Returns:
trueif valid,falseif invalid.
-
inWorldBoundsOnSphere
Checks if aILcdPointis 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:
trueif valid,falseif invalid.
-
inWorldBoundsOnEllipsoid
Checks if aILcdPointis 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:
trueif valid,falseif invalid.- See Also:
-
world2DEditableBoundsOnSphereSFCT
Sets theILcd2DEditableBoundsobject 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 theILcd2DEditableBoundsobject 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 thisILcdProjectionequals some other Object.
-