org.deegree.cs.refs.coordinatesystem
Class ProjectedCRSRef

java.lang.Object
  extended by org.deegree.commons.tom.Reference<T>
      extended by org.deegree.cs.refs.CRSResourceRef<ICRS>
          extended by org.deegree.cs.refs.coordinatesystem.CRSRef
              extended by org.deegree.cs.refs.coordinatesystem.ProjectedCRSRef
All Implemented Interfaces:
Serializable, Object, TypedObjectNode, ICRS, IProjectedCRS, CRSResource

public class ProjectedCRSRef
extends CRSRef
implements IProjectedCRS

CRSRef to a ProjectedCRS

Version:
$Revision: $, $Date: $
Author:
Lyn Buesching, last edited by: $Author: lyn $
See Also:
Serialized Form

Constructor Summary
ProjectedCRSRef(ReferenceResolver resolver, String uri, String baseURL)
          Creates a reference to a ProjectedCRS
 
Method Summary
 javax.vecmath.Point2d doInverseProjection(double x, double y)
          Do an inverse projection from projected (map) coordinates to geographic coordinates.
 javax.vecmath.Point2d doProjection(double lambda, double phi)
          The actual transform method doing a projection from geographic coordinates to map coordinates.
 boolean equals(Object obj)
           
 IGeographicCRS getGeographicCRS()
           
 IProjection getProjection()
           
 ProjectedCRS getReferencedObject()
          Returns the referenced Object instance (may trigger resolving and fetching it).
 
Methods inherited from class org.deegree.cs.refs.coordinatesystem.CRSRef
convertToAxis, equalsWithFlippedAxis, getAlias, getAreaOfUse, getAreaOfUseBBox, getAxis, getDatum, getDimension, getDirectTransformation, getEasting, getGeodeticDatum, getName, getNorthing, getTransformations, getType, getUnits, getValidDomain, hasDirectTransformation, hashCode, isXYForced, toString
 
Methods inherited from class org.deegree.cs.refs.CRSResourceRef
addAreaOfUse, addName, getAreasOfUse, getCode, getCodeAndName, getCodes, getDescription, getDescriptions, getNames, getOrignalCodeStrings, getVersion, getVersions, hasCode, hasId, hasIdOrName, setDefaultAreaOfUse, setDefaultDescription, setDefaultId, setDefaultName, setDefaultVersion
 
Methods inherited from class org.deegree.commons.tom.Reference
getId, getURI, isLocal, isResolved, resolve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.cs.coordinatesystems.ICRS
convertToAxis, equalsWithFlippedAxis, getAlias, getAxis, getDatum, getDimension, getDirectTransformation, getEasting, getGeodeticDatum, getNorthing, getTransformations, getType, getUnits, getValidDomain, hasDirectTransformation
 
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

ProjectedCRSRef

public ProjectedCRSRef(ReferenceResolver resolver,
                       String uri,
                       String baseURL)
Creates a reference to a ProjectedCRS

Parameters:
resolver - used for resolving the reference, must not be null
uri - the object's uri, must not be null
baseURL - base URL for resolving the uri, may be null (no resolving of relative URLs)
Method Detail

getReferencedObject

public ProjectedCRS getReferencedObject()
Description copied from class: Reference
Returns the referenced Object instance (may trigger resolving and fetching it).

Overrides:
getReferencedObject in class CRSRef
Returns:
the referenced Object instance

getGeographicCRS

public IGeographicCRS getGeographicCRS()
Specified by:
getGeographicCRS in interface IProjectedCRS
Returns:
the underlyingCRS.

getProjection

public IProjection getProjection()
Specified by:
getProjection in interface IProjectedCRS
Returns:
the projection.

doProjection

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

Specified by:
doProjection in interface IProjectedCRS
Parameters:
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.

doInverseProjection

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

Specified by:
doInverseProjection in interface IProjectedCRS
Parameters:
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.

equals

public boolean equals(Object obj)
Overrides:
equals in class CRSRef


Copyright © 2011. All Rights Reserved.