org.deegree.cs.projections.cylindric
Class Mercator

java.lang.Object
  extended by org.deegree.cs.CRSIdentifiable
      extended by org.deegree.cs.projections.Projection
          extended by org.deegree.cs.projections.cylindric.CylindricalProjection
              extended by org.deegree.cs.projections.cylindric.Mercator
All Implemented Interfaces:
Object, TypedObjectNode, CRSResource, IMercator, IProjection

public class Mercator
extends CylindricalProjection
implements IMercator

The Mercator projection has following properties:

Version:
$Revision: $, $Date: $
Author:
Rutger Bezema, last edited by: $Author: ionita $

Constructor Summary
Mercator(double falseNorthing, double falseEasting, javax.vecmath.Point2d naturalOrigin, Unit units, double scale)
          Sets the id to EPSG:9804
Mercator(double falseNorthing, double falseEasting, javax.vecmath.Point2d naturalOrigin, Unit units, double scale, CRSResource id)
           
 
Method Summary
 javax.vecmath.Point2d doInverseProjection(IGeographicCRS geographicCRS, double x, double y)
          Do an inverse projection from projected (map) coordinates to geographic coordinates.
 javax.vecmath.Point2d doProjection(IGeographicCRS geographicCRS, double lambda, double phi)
          The actual transform method doing a projection from geographic coordinates to map coordinates.
 String getImplementationName()
           
 
Methods inherited from class org.deegree.cs.projections.Projection
equals, getCosphi0, getEccentricity, getEllipsoid, getFalseEasting, getFalseNorthing, getNaturalOrigin, getPrimeMeridian, getProjectionLatitude, getProjectionLongitude, getScale, getScaleFactor, getSemiMajorAxis, getSemiMinorAxis, getSinphi0, getSquaredEccentricity, getUnits, hashCode, isConformal, isEqualArea, isSpherical, setFalseEasting, setScale, toString
 
Methods inherited from class org.deegree.cs.CRSIdentifiable
addAreaOfUse, addName, checkForNullObject, checkForNullObject, checkForNullObject, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getId, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.cs.projections.IProjection
getCosphi0, getEccentricity, getEllipsoid, getFalseEasting, getFalseNorthing, getNaturalOrigin, getPrimeMeridian, getProjectionLatitude, getProjectionLongitude, getScale, getScaleFactor, getSemiMajorAxis, getSemiMinorAxis, getSinphi0, getSquaredEccentricity, getUnits, isConformal, isEqualArea, isSpherical, setFalseEasting, setScale
 
Methods inherited from interface org.deegree.cs.CRSResource
addAreaOfUse, addName, getAreaOfUse, getAreaOfUseBBox, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getName, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from interface org.deegree.commons.tom.Object
getId
 

Constructor Detail

Mercator

public Mercator(double falseNorthing,
                double falseEasting,
                javax.vecmath.Point2d naturalOrigin,
                Unit units,
                double scale,
                CRSResource id)
Parameters:
geographicCRS -
falseNorthing -
falseEasting -
naturalOrigin -
units -
scale -
id - an identifiable instance containing information about this projection

Mercator

public Mercator(double falseNorthing,
                double falseEasting,
                javax.vecmath.Point2d naturalOrigin,
                Unit units,
                double scale)
Sets the id to EPSG:9804

Parameters:
geographicCRS -
falseNorthing -
falseEasting -
naturalOrigin -
units -
scale -
Method Detail

doInverseProjection

public javax.vecmath.Point2d doInverseProjection(IGeographicCRS geographicCRS,
                                                 double x,
                                                 double y)
                                          throws ProjectionException
Description copied from class: Projection
Do an inverse projection from projected (map) coordinates to geographic coordinates.

Specified by:
doInverseProjection in interface IProjection
Specified by:
doInverseProjection in class Projection
x - coordinate on the map
y - coordinate on the map
Returns:
the projected Point with x = lambda and y = phi;
Throws:
ProjectionException - if the given x and y coordinates could not be inverted to lambda and phi.

doProjection

public javax.vecmath.Point2d doProjection(IGeographicCRS geographicCRS,
                                          double lambda,
                                          double phi)
                                   throws ProjectionException
Description copied from class: Projection
The actual transform method doing a projection from geographic coordinates to map coordinates.

Specified by:
doProjection in interface IProjection
Specified by:
doProjection in class Projection
lambda - the longitude
phi - the latitude
Returns:
the projected Point or Point(Double.NAN, Double.NAN) if an error occurred.
Throws:
ProjectionException - if the given lamba and phi coordinates could not be projected to x and y.

getImplementationName

public String getImplementationName()
Specified by:
getImplementationName in interface IProjection
Specified by:
getImplementationName in class Projection
Returns:
A deegree specific name which will be used for the export of a projection.


Copyright © 2011. All Rights Reserved.