Package com.luciad.projection
Class TLcdPseudoMercator
java.lang.Object
com.luciad.projection.ALcdProjection
com.luciad.projection.ALcdCylindrical
com.luciad.projection.TLcdMercator
com.luciad.projection.TLcdPseudoMercator
- All Implemented Interfaces:
ILcdCylindrical
,ILcdProjection
,ILcdPropertyChangeSource
,Serializable
,Cloneable
Pseudo-Mercator projection.
Introduction
Cylindrical conformal projection.
Properties
- The projection is conformal.
- Meridians are equally spaced straight lines. Parallels are also straight lines but they are unequally spaced.
- The scale of the projection is
true
along the equator. - Loxodromes (rhumb lines) are shown as straight lines.
- The poles are at infinity, there is a great distortion of area in the polar regions.
Example
Sample code
ILcdProjection projection = new TLcdPseudoMercator();
Implementation aspects
This is a variation of the Mercator projection that is used by popular mapping applications such as Google Maps or Microsoft Bing. Functionally it is identical to the Mercator projection, except that it assumes a spherical ellipsoid. For this reason errors of up to 800 metres in position and 0.7 percent in scale may arise.
- See Also:
-
Field Summary
Fields inherited from class com.luciad.projection.ALcdProjection
fPropertyChangeDispatcher
Fields inherited from interface com.luciad.projection.ILcdProjection
EPSILON
-
Constructor Summary
ConstructorDescriptionConstructs a pseudo-mercator projection with the central meridian at 0.0.TLcdPseudoMercator
(double aCentralMeridian) Constructs a pseudo-mercator projection with the specified central meridian. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Makes a deep clone of thisILcdProjection
.boolean
inWorldBoundsOnEllipsoid
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid) Default implementation callsinWorldBoundsOnSphere
withaEllipsoid.getAuxRadius()
as sphere radius.void
lonlatheight2worldOnEllipsoidSFCT
(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) Default implementation callslonlatheight2worldOnEllipsoidSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.toString()
Returns theString
representation of the mercator projection.void
world2DEditableBoundsOnEllipsoidSFCT
(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBound) Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.void
world2lonlatOnEllipsoidSFCT
(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPSFCT) Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.Methods inherited from class com.luciad.projection.TLcdMercator
boundaryLats, boundaryLons, equals, getLatitudeLimits, getTrueScaleLatitude, hashCode, inLonLatBounds, inWorldBoundsOnSphere, isAllInBounds, isContinuous, loadProperties, lonlatheight2worldOnSphereSFCT, setLatitudeLimits, setTrueScaleLatitude, world2DEditableBoundsOnSphereSFCT, world2lonlatOnSphereSFCT, writePropertiesSFCT
Methods inherited from class com.luciad.projection.ALcdCylindrical
calculateCachedValues, getCentralMeridian, getOrigin, setCentralMeridian
Methods inherited from class com.luciad.projection.ALcdProjection
addPropertyChangeListener, firePropertyChangeEvent, removePropertyChangeListener
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.luciad.util.ILcdPropertyChangeSource
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
TLcdPseudoMercator
public TLcdPseudoMercator()Constructs a pseudo-mercator projection with the central meridian at 0.0. -
TLcdPseudoMercator
public TLcdPseudoMercator(double aCentralMeridian) Constructs a pseudo-mercator projection with the specified central meridian.- Parameters:
aCentralMeridian
- the central meridian of the mercator projection.
-
-
Method Details
-
lonlatheight2worldOnEllipsoidSFCT
public void lonlatheight2worldOnEllipsoidSFCT(ILcdPoint aLLHP, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aXYPointSFCT) throws TLcdOutOfBoundsException Description copied from class:ALcdProjection
Default implementation callslonlatheight2worldOnEllipsoidSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
lonlatheight2worldOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
lonlatheight2worldOnEllipsoidSFCT
in classTLcdMercator
- 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.
-
world2lonlatOnEllipsoidSFCT
public void world2lonlatOnEllipsoidSFCT(ILcdPoint aXYPoint, ILcdEllipsoid aEllipsoid, ILcd2DEditablePoint aLLPSFCT) throws TLcdOutOfBoundsException Description copied from class:ALcdProjection
Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
world2lonlatOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
world2lonlatOnEllipsoidSFCT
in classTLcdMercator
- Parameters:
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.- Throws:
TLcdOutOfBoundsException
- If theILcdPoint
aXYPoint
is not within the valid area of the projection (visible area), then this exception is thrown.
-
world2DEditableBoundsOnEllipsoidSFCT
public void world2DEditableBoundsOnEllipsoidSFCT(ILcdEllipsoid aEllipsoid, ILcd2DEditableBounds aWorldBound) Description copied from class:ALcdProjection
Default implementation callsworld2lonlatOnSphereSFCT
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
world2DEditableBoundsOnEllipsoidSFCT
in interfaceILcdProjection
- Overrides:
world2DEditableBoundsOnEllipsoidSFCT
in classTLcdMercator
- Parameters:
aEllipsoid
- ellipsoid considered.aWorldBound
- the bounds of the projection in world coordinates as side effect.
-
inWorldBoundsOnEllipsoid
Description copied from class:ALcdProjection
Default implementation callsinWorldBoundsOnSphere
withaEllipsoid.getAuxRadius()
as sphere radius.- Specified by:
inWorldBoundsOnEllipsoid
in interfaceILcdProjection
- Overrides:
inWorldBoundsOnEllipsoid
in classTLcdMercator
- 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:
-
toString
Description copied from class:TLcdMercator
Returns theString
representation of the mercator projection.- Specified by:
toString
in interfaceILcdProjection
- Overrides:
toString
in classTLcdMercator
- Returns:
- the
String
representation of the mercator projection.
-
clone
Description copied from interface:ILcdProjection
Makes a deep clone of thisILcdProjection
.- Specified by:
clone
in interfaceILcdProjection
- Overrides:
clone
in classTLcdMercator
- Returns:
- deep clone of this
ILcdProjection
.
-