org.deegree.cs.refs.projections
Class ProjectionRef
java.lang.Object
org.deegree.commons.tom.Reference<T>
org.deegree.cs.refs.CRSResourceRef<IProjection>
org.deegree.cs.refs.projections.ProjectionRef
- All Implemented Interfaces:
- Serializable, Object, TypedObjectNode, CRSResource, IProjection
- Direct Known Subclasses:
- LambertAzimuthalEqualAreaRef, LambertConformalConicRef, MercatorRef, StereographicAlternativeRef, StereographicAzimuthalRef, TransverseMercatorRef
public class ProjectionRef
- extends CRSResourceRef<IProjection>
- implements Serializable, IProjection
General CRSResourceRef
referncing a Projection
- Version:
- $Revision: $, $Date: $
- Author:
- Lyn Buesching, last edited by: $Author: lyn $
- See Also:
- Serialized Form
Methods inherited from class org.deegree.cs.refs.CRSResourceRef |
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.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 |
ProjectionRef
public ProjectionRef(ReferenceResolver resolver,
String uri,
String baseURL)
- Parameters:
resolver
- uri
- baseURL
- geoCRS
-
doProjection
public javax.vecmath.Point2d doProjection(IGeographicCRS geographicCRS,
double lambda,
double phi)
throws ProjectionException
- Description copied from interface:
IProjection
- The actual transform method doing a projection from geographic coordinates to map coordinates.
- Specified by:
doProjection
in interface IProjection
lambda
- the longitudephi
- 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.
doInverseProjection
public javax.vecmath.Point2d doInverseProjection(IGeographicCRS geographicCRS,
double x,
double y)
throws ProjectionException
- Description copied from interface:
IProjection
- Do an inverse projection from projected (map) coordinates to geographic coordinates.
- Specified by:
doInverseProjection
in interface IProjection
x
- coordinate on the mapy
- 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.
getImplementationName
public String getImplementationName()
- Specified by:
getImplementationName
in interface IProjection
- Returns:
- A deegree specific name which will be used for the export of a projection.
isConformal
public boolean isConformal()
- Specified by:
isConformal
in interface IProjection
- Returns:
- true if the projection projects conformal.
isEqualArea
public boolean isEqualArea()
- Specified by:
isEqualArea
in interface IProjection
- Returns:
- true if the projection is projects equal Area.
getScale
public double getScale()
- Specified by:
getScale
in interface IProjection
- Returns:
- the scale.
setScale
public void setScale(double scale)
- Description copied from interface:
IProjection
- Sets the old scale to the given scale, also adjusts the scaleFactor.
- Specified by:
setScale
in interface IProjection
- Parameters:
scale
- the new scale
getScaleFactor
public double getScaleFactor(IGeographicCRS geographicCRS)
- Specified by:
getScaleFactor
in interface IProjection
- Returns:
- the scale*semimajor-axis, often revered to as R*k_0 in Snyder.
getFalseEasting
public double getFalseEasting()
- Specified by:
getFalseEasting
in interface IProjection
- Returns:
- the falseEasting.
setFalseEasting
public void setFalseEasting(double newFalseEasting)
- Description copied from interface:
IProjection
- sets the false easting to given value. (Used in for example transverse mercator, while setting the utm zone).
- Specified by:
setFalseEasting
in interface IProjection
- Parameters:
newFalseEasting
- the new false easting parameter.
getFalseNorthing
public double getFalseNorthing()
- Specified by:
getFalseNorthing
in interface IProjection
- Returns:
- the falseNorthing.
getNaturalOrigin
public javax.vecmath.Point2d getNaturalOrigin()
- Specified by:
getNaturalOrigin
in interface IProjection
- Returns:
- the naturalOrigin.
getUnits
public IUnit getUnits()
- Specified by:
getUnits
in interface IProjection
- Returns:
- the units.
getPrimeMeridian
public IPrimeMeridian getPrimeMeridian(IGeographicCRS geographicCRS)
- Specified by:
getPrimeMeridian
in interface IProjection
- Returns:
- the primeMeridian of the datum.
getEllipsoid
public IEllipsoid getEllipsoid(IGeographicCRS geographicCRS)
- Specified by:
getEllipsoid
in interface IProjection
- Returns:
- the ellipsoid of the datum.
getEccentricity
public double getEccentricity(IGeographicCRS geographicCRS)
- Specified by:
getEccentricity
in interface IProjection
- Returns:
- the eccentricity of the ellipsoid of the datum.
getSquaredEccentricity
public double getSquaredEccentricity(IGeographicCRS geographicCRS)
- Specified by:
getSquaredEccentricity
in interface IProjection
- Returns:
- the eccentricity of the ellipsoid of the datum.
getSemiMajorAxis
public double getSemiMajorAxis(IGeographicCRS geographicCRS)
- Specified by:
getSemiMajorAxis
in interface IProjection
- Returns:
- the semiMajorAxis (a) of the ellipsoid of the datum.
getSemiMinorAxis
public double getSemiMinorAxis(IGeographicCRS geographicCRS)
- Specified by:
getSemiMinorAxis
in interface IProjection
- Returns:
- the semiMinorAxis (a) of the ellipsoid of the datum.
isSpherical
public boolean isSpherical(IGeographicCRS geographicCRS)
- Specified by:
isSpherical
in interface IProjection
- Returns:
- true if the ellipsoid of the datum is a sphere and not an ellipse.
getProjectionLatitude
public double getProjectionLatitude()
- Specified by:
getProjectionLatitude
in interface IProjection
- Returns:
- the projectionLatitude also known as central-latitude or latitude-of-origin, in Snyder referenced as
phi_1 for azimuthal, phi_0 for other projections.
getProjectionLongitude
public double getProjectionLongitude()
- Specified by:
getProjectionLongitude
in interface IProjection
- Returns:
- the projectionLongitude also known as projection-meridian or central-meridian, in Snyder referenced as
lambda_0
getSinphi0
public double getSinphi0()
- Specified by:
getSinphi0
in interface IProjection
- Returns:
- the sinphi0, the sine of the projection latitude
getCosphi0
public double getCosphi0()
- Specified by:
getCosphi0
in interface IProjection
- Returns:
- the cosphi0, the cosine of the projection latitude
equals
public boolean equals(Object obj)
- Overrides:
equals
in class CRSResourceRef<IProjection>
Copyright © 2011. All Rights Reserved.