public class TLcdMercator extends ALcdCylindrical
Cylindrical conformal projection.
true
along the equator.
ILcdProjection projection =
new TLcdMercator(0.0, 0.0);
The equations of the mercator projection are taken from [Snyder1987].
fPropertyChangeDispatcher
EPSILON
Constructor and Description |
---|
TLcdMercator()
Constructs a mercator projection with the central meridian at 0.0.
|
TLcdMercator(double aCentralMeridian)
Constructs a mercator projection with the specified central meridian.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
boundaryLats(double lon)
Default implementation.
|
double[][] |
boundaryLons(double lat)
Default implementation.
|
Object |
clone()
Makes a deep clone of this
ILcdProjection . |
boolean |
equals(Object o)
Checks if this
ILcdProjection equals some other Object. |
ILcdInterval |
getLatitudeLimits()
Returns the upper and lower latitude boundaries of the projection.
|
double |
getTrueScaleLatitude()
Returns the latitude which is made standard, with true scale.
|
int |
hashCode() |
boolean |
inLonLatBounds(ILcdPoint aLLP)
Checks if an
ILcdPoint is inside the valid area of geodetic
coordinates of the projection. |
boolean |
inWorldBoundsOnEllipsoid(ILcdPoint aXYPoint,
ILcdEllipsoid aEllipsoid)
Default implementation calls
inWorldBoundsOnSphere with
aEllipsoid.getAuxRadius() as sphere radius. |
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 aProperty)
Load the property of an
ALcdCylindrical : the central meridian
of the projection. |
void |
lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aXYPointSFCT)
Default implementation calls
lonlatheight2worldOnEllipsoidSFCT
with aEllipsoid.getAuxRadius() as sphere radius. |
void |
lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP,
double aRadius,
ILcd2DEditablePoint aXYPointSFCT)
Transforms an
ILcd2DEditablePoint on a sphere into the
cartesian coordinate system of the projection. |
void |
setLatitudeLimits(ILcdInterval aLatitudeInterval)
Changes the upper and lower latitude boundaries of the projection.
|
void |
setTrueScaleLatitude(double aLatitude)
Sets the latitude which is made standard, with true scale.
|
String |
toString()
Returns the
String representation of the mercator projection. |
void |
world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid,
ILcd2DEditableBounds aWorldBound)
Default implementation calls
world2lonlatOnSphereSFCT with
aEllipsoid.getAuxRadius() as sphere radius. |
void |
world2DEditableBoundsOnSphereSFCT(double aRadius,
ILcd2DEditableBounds aWorldBound)
Projection is cut off near the poles.
|
void |
world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint,
ILcdEllipsoid aEllipsoid,
ILcd2DEditablePoint aLLPSFCT)
Default implementation calls
world2lonlatOnSphereSFCT with
aEllipsoid.getAuxRadius() as sphere radius. |
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. |
void |
writePropertiesSFCT(String aPrefix,
Properties aPropertySFCT)
Writes the property of an
ALcdCylindrical : the central
meridian of the projection. |
calculateCachedValues, getCentralMeridian, getOrigin, setCentralMeridian
addPropertyChangeListener, firePropertyChangeEvent, removePropertyChangeListener
finalize, getClass, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, removePropertyChangeListener
public TLcdMercator()
public TLcdMercator(double aCentralMeridian)
aCentralMeridian
- the central meridian of the mercator projection.public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) 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.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.public void lonlatheight2worldOnSphereSFCT(ILcdPoint aLLHP, double aRadius, ILcd2DEditablePoint aXYPointSFCT) 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).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.public double getTrueScaleLatitude()
public void setTrueScaleLatitude(double aLatitude)
aLatitude
- the latitude which is true to scalepublic 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
ALcdProjection
world2lonlatOnSphereSFCT
with
aEllipsoid.getAuxRadius()
as sphere radius.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 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 boolean isContinuous()
ILcdProjection
ILcdProjection
is continuous if there are no interruptions
in the world coordinates. Most projections are continuous.isContinuous
in interface ILcdProjection
isContinuous
in class ALcdCylindrical
true
if the projection is continuous,
false
otherwise.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 setLatitudeLimits(ILcdInterval aLatitudeInterval)
aLatitudeInterval
- the latitude boundaries of the projection. The
interval should not extend [ -89.5, 89.5 ]IllegalArgumentException
- if the interval extends [ -89.5, 89.5 ]public ILcdInterval getLatitudeLimits()
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 boolean inWorldBoundsOnEllipsoid(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid)
ALcdProjection
inWorldBoundsOnSphere
with
aEllipsoid.getAuxRadius()
as sphere radius.inWorldBoundsOnEllipsoid
in interface ILcdProjection
inWorldBoundsOnEllipsoid
in class ALcdProjection
aXYPoint
- point to be checked upon.aEllipsoid
- ellipsoid on which the geodetic coordinate is defined.true
if valid, false
if invalid.ILcdProjection.inWorldBoundsOnSphere(com.luciad.shape.ILcdPoint, double)
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 void world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBound)
ALcdProjection
world2lonlatOnSphereSFCT
with
aEllipsoid.getAuxRadius()
as sphere radius.world2DEditableBoundsOnEllipsoidSFCT
in interface ILcdProjection
world2DEditableBoundsOnEllipsoidSFCT
in class ALcdProjection
aEllipsoid
- ellipsoid considered.aWorldBound
- the bounds of the projection in world coordinates as side effect.public void writePropertiesSFCT(String aPrefix, Properties aPropertySFCT)
ALcdCylindrical
: the central
meridian of the projection. This method will, given aPrefix, store he
property of this ALcdCylindrical
into the aPropertiesSFCT
object. The value of following key is stored:
lattitude limits
and true scale latitude
using the following properties:
writePropertiesSFCT
in interface ILcdProjection
writePropertiesSFCT
in class ALcdCylindrical
aPrefix
- prefix for the property names.aPropertySFCT
- Properties object to store the serialized properties by side effect.public void loadProperties(String aPrefix, Properties aProperty) throws IllegalArgumentException
ALcdCylindrical
: the central meridian
of the projection. This method will, given aPrefix, analyze the aProperties
object to set the property of this ALcdCylindrical
. The value
of following key is retrieved:
lattitude limits
and true scale latitude
using the following properties:
loadProperties
in interface ILcdProjection
loadProperties
in class ALcdCylindrical
aPrefix
- prefix of the property names.aProperty
- Properties object containing the serialized properties.IllegalArgumentException
- if the projection cannot be created.public String toString()
String
representation of the mercator projection.toString
in interface ILcdProjection
toString
in class Object
String
representation of the mercator projection.public Object clone()
ILcdProjection
ILcdProjection
.clone
in interface ILcdProjection
clone
in class ALcdCylindrical
ILcdProjection
.public boolean equals(Object o)
ILcdProjection
ILcdProjection
equals some other Object.equals
in interface ILcdProjection
equals
in class ALcdCylindrical
o
- Object to compare with.ILcdProjection
class and having the same
projection properties, false otherwise.public int hashCode()
hashCode
in class ALcdCylindrical