com.partnersoft.geometry.projection
Class TransverseMercator

java.lang.Object
  extended by com.partnersoft.geometry.projection.Projection
      extended by com.partnersoft.geometry.projection.StandardProjection
          extended by com.partnersoft.geometry.projection.TransverseMercator
All Implemented Interfaces:
Coggable, ProjectionConstants
Direct Known Subclasses:
UTM

public class TransverseMercator
extends StandardProjection


Field Summary
 
Fields inherited from class com.partnersoft.geometry.projection.StandardProjection
a, b, datum, e, ellipsoid, es, esp, initialized, lam0, NAD27, NAD83, originLatitude, originLongitude, originX, originY, phi0
 
Fields inherited from interface com.partnersoft.geometry.projection.ProjectionConstants
ATOL, DEG2RAD, EPSILON, FOURTHPI, HALFPI, ONE_TOL, PI, RAD2DEG, TOL, TWOPI
 
Constructor Summary
TransverseMercator()
           
 
Method Summary
protected  double forwardM(double phi, double sphi, double cphi, double[] inCoefficients)
          Utility functions for calculating M in forward direction.
protected  double[] getCoefficients(double es)
          Calculate the series expansion.
 double getScaleReduction()
          Scale reduction (?)
 Cog getState()
           
protected  void initializeImp()
           
 void project(Point point)
          Project from latlong to xy.
 void reverse(Point point)
          Reverse project from xy to latlong.
protected  double reverseM(double arg, double es, double[] inCoefficients)
          Utility function for calculating M in the reverse direction.
 void setScaleReduction(double newScaleReduction)
          Scale reduction (?)
 void setState(Cog newState)
           
 
Methods inherited from class com.partnersoft.geometry.projection.StandardProjection
aacos, aasin, aatan2, abs, asin, asqrt, atan, atan2, cos, getDatum, getEllipsoid, getOriginLatitude, getOriginLongitude, getOriginX, getOriginY, gpsToProjection, hypot, initialize, log, pj_enfn, pj_msfn, pj_phi2, pj_qsfn, pj_tsfn, pow, projectionToGPS, setDatum, setEllipsoid, setOriginLatitude, setOriginLongitude, setOriginX, setOriginY, sin, sqrt, tan, toDegrees, toRadians
 
Methods inherited from class com.partnersoft.geometry.projection.Projection
project, project, projectFeet, projectFeet, projectFeet, reverse, reverse, reverseFeet, reverseFeet, reverseFeet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransverseMercator

public TransverseMercator()
Method Detail

project

public void project(Point point)
Description copied from class: Projection
Project from latlong to xy. Modifies the input Point. Remember that Point.x is longitude, Point.y is latitude.

Specified by:
project in class Projection

reverse

public void reverse(Point point)
Description copied from class: Projection
Reverse project from xy to latlong. Results are returned with point.x = long, point.y = lat. Modifies input.

Specified by:
reverse in class Projection

getCoefficients

protected double[] getCoefficients(double es)
Calculate the series expansion. eSquared = (a^2-b^2)/(a^2) where a and b are the major and minor axes of the ellipsoid in question.


forwardM

protected double forwardM(double phi,
                          double sphi,
                          double cphi,
                          double[] inCoefficients)
Utility functions for calculating M in forward direction. meridinal distance for ellipsoid and inverse 8th degree - accurate to < 1e-5 meters when used in conjuction with typical major axis values.


reverseM

protected double reverseM(double arg,
                          double es,
                          double[] inCoefficients)
Utility function for calculating M in the reverse direction. This is an itterative approach that rairly goes beyond 2 itterations, However it is designed to break at MAX_ITERATIONS and return the best guess at that point. Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds.


initializeImp

protected void initializeImp()
Specified by:
initializeImp in class StandardProjection

getScaleReduction

public double getScaleReduction()
Scale reduction (?)


setScaleReduction

public void setScaleReduction(double newScaleReduction)
Scale reduction (?)


getState

public Cog getState()
Specified by:
getState in interface Coggable
Overrides:
getState in class StandardProjection

setState

public void setState(Cog newState)
Specified by:
setState in interface Coggable
Overrides:
setState in class StandardProjection