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

Copyright 2004 Partner Software, Inc.

Version:
$Id: TransverseMercator.java 2046 2009-08-25 05:28:53Z paul $
Author:
Paul Reavis, Russell Cagle

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, INTERNATIONAL_FEET_TO_METERS, METERS_TO_INTERNATIONAL_FEET, METERS_TO_US_SURVEY_FEET, NULL_PROJECTION, ONE_TOL, PI, RAD2DEG, TOL, TWOPI, US_SURVEY_FEET_TO_METERS
 
Constructor Summary
TransverseMercator()
           
TransverseMercator(Cog newState)
           
 
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 (?)
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 (?)
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
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
getName, project, project, project, project, projectFeet, projectFeet, projectFeet, projectFeet, projectFeet, reverse, reverse, reverse, reverse, reverseFeet, reverseFeet, reverseFeet, reverseFeet, reverseFeet, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransverseMercator

public TransverseMercator()

TransverseMercator

public TransverseMercator(Cog newState)
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 (?)


toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Overrides:
toCog in class StandardProjection
Returns:
Cog representing the internal state of this object