com.metsci.glimpse.util.geo.projection
Class TangentPlane

java.lang.Object
  extended by com.metsci.glimpse.util.geo.projection.TangentPlane
All Implemented Interfaces:
GeoProjection, java.io.Serializable

public final class TangentPlane
extends java.lang.Object
implements GeoProjection, java.io.Serializable

Implementation of GeoProjection via a plane which is tangent to the Earth and maps x, y coordinates on the plane to/from lat/lon pairs. Class instances are immutable.

Author:
moskowitz
See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
TangentPlane(LatLonGeo latLon)
          Create tangent plane mapping latLon to 0,0 on plane.
TangentPlane(LatLonGeo latLon, double tangentPointOnPlaneX, double tangentPointOnPlaneY)
          Create tangent plane mapping latLon to x, y on plane.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Vector3d getLocalEast()
          The vector (in ECEF-r coordinates) corresponding to traveling East on the tangent plane.
 Vector3d getLocalNorth()
          The vector (in ECEF-r coordinates) corresponding to traveling North on the tangent plane.
 LatLonGeo getRefLatLon()
           
 Vector3d getRefPointOnUnitSphere()
           
 Vector2d getTangentPointOnPlane()
          Tangent plane coordinates (x,y) of point on the plane tangent to reference LatLon.
 int hashCode()
           
 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.
 java.lang.String toString()
           
 LatLonGeo unproject(double planeX, double planeY)
          Convert projected x,y position back to (nearly) equivalent LatLon.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

TangentPlane

public TangentPlane(LatLonGeo latLon)
Create tangent plane mapping latLon to 0,0 on plane.

Parameters:
latLon -

TangentPlane

public TangentPlane(LatLonGeo latLon,
                    double tangentPointOnPlaneX,
                    double tangentPointOnPlaneY)
Create tangent plane mapping latLon to x, y on plane.

Parameters:
latLon -
tangentPointOnPlaneX -
tangentPointOnPlaneY -
Method Detail

unproject

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

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

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

getRefLatLon

public LatLonGeo getRefLatLon()

getRefPointOnUnitSphere

public Vector3d getRefPointOnUnitSphere()

getLocalEast

public Vector3d getLocalEast()
The vector (in ECEF-r coordinates) corresponding to traveling East on the tangent plane.


getLocalNorth

public Vector3d getLocalNorth()
The vector (in ECEF-r coordinates) corresponding to traveling North on the tangent plane.


getTangentPointOnPlane

public Vector2d getTangentPointOnPlane()
Tangent plane coordinates (x,y) of point on the plane tangent to reference 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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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