com.metsci.glimpse.charts.vector
Class MercatorProjection

java.lang.Object
  extended by com.metsci.glimpse.charts.vector.MercatorProjection
All Implemented Interfaces:
GeoProjection

public class MercatorProjection
extends java.lang.Object
implements GeoProjection

Mercator cylindrical map projection.

Author:
ulman

Constructor Summary
MercatorProjection()
           
MercatorProjection(double center_longitude_deg)
           
 
Method Summary
 Vector2d project(LatLonGeo latLon)
          Convert LatLon to (nearly) equivalent projected x,y position.
 Vector2d reprojectFrom(double x, double y, GeoProjection fromProjection)
          Reproject an x,y position from a previous projection to this projection.
 KinematicVector2d reprojectPosVelFrom(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.
 LatLonGeo unproject(double x, double y)
          Convert projected x,y position back to (nearly) equivalent LatLon.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MercatorProjection

public MercatorProjection(double center_longitude_deg)

MercatorProjection

public MercatorProjection()
Method Detail

project

public Vector2d project(LatLonGeo latLon)
Description copied from interface: GeoProjection
Convert LatLon to (nearly) equivalent projected x,y position.

Specified by:
project in interface GeoProjection
Returns:
projected x, y

unproject

public LatLonGeo unproject(double x,
                           double y)
Description copied from interface: GeoProjection
Convert projected x,y position back to (nearly) equivalent LatLon.

Specified by:
unproject in interface GeoProjection
Parameters:
x - projected x position
y - projected y position
Returns:
latLon

reprojectFrom

public Vector2d reprojectFrom(double x,
                              double y,
                              GeoProjection fromProjection)
Description copied from interface: GeoProjection
Reproject 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:
reprojectFrom in interface GeoProjection
Parameters:
x - previously projected x position
y - previously projected y position
fromProjection - previous projection
Returns:
projected position

reprojectPosVelFrom

public KinematicVector2d reprojectPosVelFrom(double x,
                                             double y,
                                             double vx,
                                             double vy,
                                             GeoProjection fromProjection)
Description copied from interface: GeoProjection
Reproject x, y position and corresponding x, y velocity vector at that location from a previous projection to this projection.

Specified by:
reprojectPosVelFrom in interface GeoProjection
Parameters:
x - previously projected x position
y - previously projected y position
vx - previous x velocity component in projection space
vy - previous y velocity component in projection space
fromProjection - previous projection
Returns:
projected position and velocity


Copyright © 2012 Metron, Inc.. All Rights Reserved.