org.deegree.cs.coordinatesystems
Class ProjectedCRS
java.lang.Object
org.deegree.cs.CRSIdentifiable
org.deegree.cs.coordinatesystems.CRS
org.deegree.cs.coordinatesystems.ProjectedCRS
- All Implemented Interfaces:
- Object, TypedObjectNode, ICRS, IProjectedCRS, CRSResource
public class ProjectedCRS
- extends CRS
- implements IProjectedCRS
A ProjectedCRS is a coordinatesystem defined with a projection and a geographic crs. It allows for
transformation between projected coordinates (mostly in meters) and the lat/lon coordinates of the geographic crs and
vice versa.
- Version:
- $Revision: 30961 $, $Date: 2011-05-30 13:12:58 +0200 (Mon, 30 May 2011) $
- Author:
- Rutger Bezema, last edited by: $Author: lbuesching $
| Nested classes/interfaces inherited from class org.deegree.cs.coordinatesystems.CRS |
CRS.CRSType |
|
Constructor Summary |
ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType code)
|
ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType[] codes)
|
ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType[] codes,
String[] names,
String[] versions,
String[] descriptions,
String[] areasOfUse)
|
ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType code,
String name,
String version,
String description,
String areaOfUse)
|
ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSResource identity)
|
ProjectedCRS(List<Transformation> transformations,
IGeographicCRS geographicCRS,
IProjection projection,
IAxis[] axisOrder,
CRSResource identity)
|
| Methods inherited from class org.deegree.cs.coordinatesystems.CRS |
convertToAxis, getAlias, getAxis, getDatum, getDirectTransformation, getEasting, getGeodeticDatum, getNorthing, getTransformations, getTypeName, getUnits, getValidDomain, hasDirectTransformation |
| 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 interface org.deegree.cs.coordinatesystems.ICRS |
convertToAxis, getAlias, getAxis, getDatum, getDirectTransformation, getEasting, getGeodeticDatum, getNorthing, getTransformations, 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 |
ProjectedCRS
public ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSResource identity)
- Parameters:
projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.identity -
ProjectedCRS
public ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType[] codes,
String[] names,
String[] versions,
String[] descriptions,
String[] areasOfUse)
- Parameters:
projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.codes - names - versions - descriptions - areasOfUse -
ProjectedCRS
public ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType[] codes)
- Parameters:
projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.codes -
ProjectedCRS
public ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType code,
String name,
String version,
String description,
String areaOfUse)
- Parameters:
projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.code - name - version - description - areaOfUse -
ProjectedCRS
public ProjectedCRS(IProjection projection,
IGeographicCRS geographicCRS,
IAxis[] axisOrder,
CRSCodeType code)
- Parameters:
projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.code -
ProjectedCRS
public ProjectedCRS(List<Transformation> transformations,
IGeographicCRS geographicCRS,
IProjection projection,
IAxis[] axisOrder,
CRSResource identity)
- Parameters:
transformations - to use instead of the helmert transformation.projection - the projection which converts coordinates from this ProjectedCRS into the underlying GeographicCRS and
vice versa.axisOrder - of this projection.identity -
getDimension
public int getDimension()
- Specified by:
getDimension in interface ICRS
- Returns:
- the dimension of this CRS.
getGeographicCRS
public final IGeographicCRS getGeographicCRS()
- Specified by:
getGeographicCRS in interface IProjectedCRS
- Returns:
- the underlyingCRS.
getType
public final CRS.CRSType getType()
- Specified by:
getType in interface ICRS
- Returns:
- one of the *_CRS types defined in this class.
getProjection
public final 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 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(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 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.
equals
public boolean equals(Object other)
- Overrides:
equals in class CRS
toString
public String toString()
- Overrides:
toString in class CRS
hashCode
public int hashCode()
- Implementation as proposed by Joshua Block in Effective Java (Addison-Wesley 2001), which supplies an even
distribution and is relatively fast. It is created from field f as follows:
- boolean -- code = (f ? 0 : 1)
- byte, char, short, int -- code = (int)f
- long -- code = (int)(f ^ (f >>>32))
- float -- code = Float.floatToIntBits(f);
- double -- long l = Double.doubleToLongBits(f); code = (int)(l ^ (l >>> 32))
- all Objects, (where equals( ) calls equals( ) for this field) -- code = f.hashCode( )
- Array -- Apply above rules to each element
Combining the hash code(s) computed above: result = 37 * result + code;
- Overrides:
hashCode in class CRS
- Returns:
- (int) ( result >>> 32 ) ^ (int) result;
- See Also:
Object.hashCode()
equalsWithFlippedAxis
public boolean equalsWithFlippedAxis(Object other)
- Description copied from interface:
ICRS
- TODO: this methode should become redundant with the reworked identifer concept!
- Specified by:
equalsWithFlippedAxis in interface ICRS- Overrides:
equalsWithFlippedAxis in class CRS
- Returns:
- true, if this and other are from the same type differes only in a flipped axis order.
Copyright © 2011. All Rights Reserved.