gistoolkit.projection
Class SimpleProjection

java.lang.Object
  extended bygistoolkit.projection.SimpleProjection
All Implemented Interfaces:
EllipsoidProjection, Projection
Direct Known Subclasses:
AlbersEqualAreaProjection, LambertConicConformalProjection

public abstract class SimpleProjection
extends java.lang.Object
implements Projection, EllipsoidProjection

Used for handling general things like lat oragin, long oragin, and elipsoid.


Field Summary
static double FORTPI
          PI /4
static double HALFPI
          PI /2
static double PI
          Ratio of the circumference of a circle to its diameter
static double TWOPI
          Pi * 2
 
Constructor Summary
SimpleProjection()
           
 
Method Summary
(package private)  double aacos(double v)
           
(package private)  double aasin(double v)
           
(package private)  double aatan2(double n, double d)
           
(package private)  double asqrt(double v)
           
abstract  java.lang.Object clone()
          clone this object
protected  void doSetup()
          allow insertable setup data
 double getEasting()
          Retrieve the easting of true oragin for this projection
 double getEccentricity()
          get the eccentricity number
 Ellipsoid getEllipsoid()
          Retrieve the ellipsoid used to model the lat long coordinates of the earth
 double getESquared()
          get the esquared number
 double getLatOragin()
          Retrieve the latitude location of the true oragin of the map.
 double getLonOragin()
          Retrieve the longatude location of the true oragin of the map.
 Node getNode()
          Return the configuration information for this projection
 double getNorthing()
          Retrieve the northing of true oragin for this projection
abstract  java.lang.String getProjectionName()
          return the name of the projection
 java.lang.String getUnitOfMeasure()
          return the units for this projection.
 double hypot(double x, double y)
          return the euclidian hypotenuse of a right triangle Math.sqrt(x*x+y*y);
static double[] pj_enfn(double inESquared)
          meridinal distance for ellipsoid and inverse 8th degree - accurate to < 1e-5 meters when used in conjuction with typical major axis values.
(package private)  double pj_msfn(double sinphi, double cosphi, double es)
           
static double pj_phi2(double ts, double e)
          determine latitude angle phi-2
(package private)  double pj_qsfn(double sinphi, double e, double one_es)
          determine small q
static double pj_tsfn(double phi, double sinphi, double e)
          determine latitude angle phi-2
abstract  void projectBackward(Point inPoint)
          Project the data in the reverse direction
abstract  void projectForward(Point inPoint)
          Project the data in the forward direction
 void setEasting(double inEasting)
          Set the easting of true oragin for this projection
 void setEllipsoid(Ellipsoid inEllipsoid)
          Set the ellipsoid used to model the lat long coordinates of the earth
 void setEnvelope(Envelope inEnvelope)
          set the envelope of the map.
 void setLatOragin(double inLatOragin)
          Set the latitude location of the true oragin of the map.
 void setLonOragin(double inLonOragin)
          Set the longatude location of the true oragin of the map.
 void setNode(Node inNode)
          Setup this projection using the configuration information in the node
 void setNorthing(double inNorthing)
          Set the northing of true oragin for this projection
protected  void setup()
          Run setup
 java.lang.String toString()
          Return the name of the projection
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HALFPI

public static final double HALFPI
PI /2

See Also:
Constant Field Values

FORTPI

public static final double FORTPI
PI /4

See Also:
Constant Field Values

PI

public static final double PI
Ratio of the circumference of a circle to its diameter

See Also:
Constant Field Values

TWOPI

public static final double TWOPI
Pi * 2

See Also:
Constant Field Values
Constructor Detail

SimpleProjection

public SimpleProjection()
Method Detail

getLatOragin

public double getLatOragin()
Retrieve the latitude location of the true oragin of the map.


setLatOragin

public void setLatOragin(double inLatOragin)
Set the latitude location of the true oragin of the map.


getLonOragin

public double getLonOragin()
Retrieve the longatude location of the true oragin of the map.


setLonOragin

public void setLonOragin(double inLonOragin)
Set the longatude location of the true oragin of the map.


getNorthing

public double getNorthing()
Retrieve the northing of true oragin for this projection


setNorthing

public void setNorthing(double inNorthing)
Set the northing of true oragin for this projection


getEasting

public double getEasting()
Retrieve the easting of true oragin for this projection


setEasting

public void setEasting(double inEasting)
Set the easting of true oragin for this projection


getEllipsoid

public Ellipsoid getEllipsoid()
Retrieve the ellipsoid used to model the lat long coordinates of the earth

Specified by:
getEllipsoid in interface EllipsoidProjection

setEllipsoid

public void setEllipsoid(Ellipsoid inEllipsoid)
Set the ellipsoid used to model the lat long coordinates of the earth


getUnitOfMeasure

public java.lang.String getUnitOfMeasure()
return the units for this projection.

Specified by:
getUnitOfMeasure in interface Projection

getESquared

public double getESquared()
get the esquared number


getEccentricity

public double getEccentricity()
get the eccentricity number


setup

protected final void setup()
                    throws java.lang.Exception
Run setup

Throws:
java.lang.Exception

doSetup

protected void doSetup()
                throws java.lang.Exception
allow insertable setup data

Throws:
java.lang.Exception

projectForward

public abstract void projectForward(Point inPoint)
                             throws java.lang.Exception
Project the data in the forward direction

Specified by:
projectForward in interface Projection
Throws:
java.lang.Exception

projectBackward

public abstract void projectBackward(Point inPoint)
                              throws java.lang.Exception
Project the data in the reverse direction

Specified by:
projectBackward in interface Projection
Throws:
java.lang.Exception

getProjectionName

public abstract java.lang.String getProjectionName()
return the name of the projection

Specified by:
getProjectionName in interface Projection

hypot

public double hypot(double x,
                    double y)
return the euclidian hypotenuse of a right triangle Math.sqrt(x*x+y*y);


pj_enfn

public static double[] pj_enfn(double inESquared)
meridinal distance for ellipsoid and inverse 8th degree - accurate to < 1e-5 meters when used in conjuction with typical major axis values. Inverse determines phi to EPS (1e-11) radians, about 1e-6 seconds. 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.


pj_tsfn

public static double pj_tsfn(double phi,
                             double sinphi,
                             double e)
determine latitude angle phi-2


pj_phi2

public static double pj_phi2(double ts,
                             double e)
                      throws java.lang.Exception
determine latitude angle phi-2

Throws:
java.lang.Exception

pj_msfn

double pj_msfn(double sinphi,
               double cosphi,
               double es)

pj_qsfn

double pj_qsfn(double sinphi,
               double e,
               double one_es)
determine small q


aasin

double aasin(double v)
       throws java.lang.Exception
Throws:
java.lang.Exception

aacos

double aacos(double v)
       throws java.lang.Exception
Throws:
java.lang.Exception

asqrt

double asqrt(double v)

aatan2

double aatan2(double n,
              double d)

getNode

public Node getNode()
Return the configuration information for this projection

Specified by:
getNode in interface Projection

setNode

public void setNode(Node inNode)
             throws java.lang.Exception
Setup this projection using the configuration information in the node

Specified by:
setNode in interface Projection
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Return the name of the projection


clone

public abstract java.lang.Object clone()
clone this object

Specified by:
clone in interface Projection

setEnvelope

public void setEnvelope(Envelope inEnvelope)
                 throws java.lang.Exception
set the envelope of the map. The projection may do some initialization bassed on this value

Specified by:
setEnvelope in interface Projection
Throws:
java.lang.Exception