Class MercatorProjection
- java.lang.Object
-
- com.metsci.glimpse.util.geo.projection.MercatorProjection
-
- All Implemented Interfaces:
GeoProjection,Serializable
public class MercatorProjection extends Object implements GeoProjection, Serializable
Mercator cylindrical map projection.- Author:
- ulman
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MercatorProjection()MercatorProjection(double originLon_DEG)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()doubleoriginLon_DEG()doubleoriginLon_RAD()Vector2dproject(LatLonGeo latLon)Convert LatLon to (nearly) equivalent projected x,y position.Vector2dreprojectFrom(double x, double y, GeoProjection fromProjection)Reproject an x,y position from a previous projection to this projection.KinematicVector2dreprojectPosVelFrom(double x, double y, double vx, double vy, GeoProjection fromProjection)Reproject x, y position and corresponding x, y velocity vector at that location from a previous projection to this projection.LatLonGeounproject(double x, double y)Convert projected x,y position back to (nearly) equivalent LatLon.
-
-
-
Method Detail
-
originLon_DEG
public double originLon_DEG()
-
originLon_RAD
public double originLon_RAD()
-
project
public Vector2d project(LatLonGeo latLon)
Description copied from interface:GeoProjectionConvert LatLon to (nearly) equivalent projected x,y position.- Specified by:
projectin interfaceGeoProjection- Returns:
- projected x, y
-
unproject
public LatLonGeo unproject(double x, double y)
Description copied from interface:GeoProjectionConvert projected x,y position back to (nearly) equivalent LatLon.- Specified by:
unprojectin interfaceGeoProjection- Parameters:
x- projected x positiony- projected y position- Returns:
- latLon
-
reprojectFrom
public Vector2d reprojectFrom(double x, double y, GeoProjection fromProjection)
Description copied from interface:GeoProjectionReproject an x,y position from a previous projection to this projection.This is equivalent to unprojecting the x,y position from the old projection and then projecting it to this projection, but in a single step, which may be performed more efficiently.
- Specified by:
reprojectFromin interfaceGeoProjection- Parameters:
x- previously projected x positiony- previously projected y positionfromProjection- previous projection- Returns:
- projected position
-
reprojectPosVelFrom
public KinematicVector2d reprojectPosVelFrom(double x, double y, double vx, double vy, GeoProjection fromProjection)
Description copied from interface:GeoProjectionReproject x, y position and corresponding x, y velocity vector at that location from a previous projection to this projection.- Specified by:
reprojectPosVelFromin interfaceGeoProjection- Parameters:
x- previously projected x positiony- previously projected y positionvx- previous x velocity component in projection spacevy- previous y velocity component in projection spacefromProjection- previous projection- Returns:
- projected position and velocity
-
-