org.cts.crs
Class GeodeticCRS

java.lang.Object
  extended by org.cts.IdentifiableComponent
      extended by org.cts.crs.GeodeticCRS
All Implemented Interfaces:
CoordinateReferenceSystem, Identifiable
Direct Known Subclasses:
CompoundCRS, GeocentricCRS, Geographic2DCRS, Geographic3DCRS, ProjectedCRS

public abstract class GeodeticCRS
extends IdentifiableComponent
implements CoordinateReferenceSystem

A geodetic CoordinateReferenceSystem is a coordinate system based on a GeodeticDatum, a PrimeMeridian and an org.cts.Ellipsoid. It is an abstract class including Geographic3D, Geographic2D and Projected CoordinateReferenceSystems.

Author:
Michaƫl Michaud

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.cts.crs.CoordinateReferenceSystem
CoordinateReferenceSystem.Type
 
Field Summary
protected  CoordinateSystem coordinateSystem
          The CoordinateSystem used by this CoordinateReferenceSystem.
 
Fields inherited from interface org.cts.Identifiable
DEFAULT, LOCAL, UNKNOWN
 
Constructor Summary
protected GeodeticCRS(Identifier identifier, GeodeticDatum datum, CoordinateSystem coordinateSystem)
          Create a new GeodeticCRS.
 
Method Summary
 void addCRSTransformation(CoordinateReferenceSystem crs, List<CoordinateOperation> opList)
          Add a transformation for this CRS to the CRS in parameter.
 void addGridTransformation(GeodeticDatum gd, CoordinateOperation coordOp)
          Add a Nadgrids Transformation for this CRS to the CRS using the key GeodeticDatum.
 boolean equals(Object o)
          Returns true if object is equals to this.
abstract  CoordinateOperation fromGeographicCoordinateConverter()
          Creates a CoordinateOperation object to convert coordinates from a GeographicReferenceSystem based on the same horizonal datum and vertical datum, and using normal SI units in the following order : latitude (rad), longitude (rad) height/altitude (m) to this CoordinateReferenceSystem.
 CoordinateSystem getCoordinateSystem()
          Returns the CoordinateSystem used by this CoordinateReferenceSystem.
 Map<CoordinateReferenceSystem,List<CoordinateOperation>> getCRSTransformations()
          Return the list of nadgrids transformations defined for this CRS.
 List<CoordinateOperation> getCRSTransformations(CoordinateReferenceSystem crs)
          Return the list of transformations defined for this CRS to the CRS in parameter.
 GeodeticDatum getDatum()
          Returns the Datum to which this CoordinateReferenceSystem is refering.
 int getDimension()
          Returns the number of dimensions of the CoordinateSystem used by this CoordinateReferenceSystem.
 Map<GeodeticDatum,List<CoordinateOperation>> getGridTransformations()
          Return the list of nadgrids transformation defined for this CRS.
 List<CoordinateOperation> getGridTransformations(GeodeticDatum datum)
          Return the list of nadgrids transformation defined for this CRS that used the datum in parameter as target datum.
 Projection getProjection()
          Returns the Projection to which this CoordinateReferenceSystem is refering.
abstract  CoordinateReferenceSystem.Type getType()
          Returns this CoordinateReferenceSystem Type.
 int hashCode()
          Returns the hash code for this GeodeticCRS.
 boolean isValid(double[] coord)
          Return whether this coord is a valid coord in this CoordinateReferenceSystem.
abstract  CoordinateOperation toGeographicCoordinateConverter()
          Creates a CoordinateOperation object to convert coordinates from this CoordinateReferenceSystem to a GeographicReferenceSystem based on the same horizonal datum and vertical datum, and using normal SI units in the following order : latitude (rad), longitude (rad) height/altitude (m).
 String toString()
          Return a String representation of this Datum.
abstract  String toWKT()
          Returns a WKT representation of the geodetic CRS.
 
Methods inherited from class org.cts.IdentifiableComponent
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getComponent, getIdentifier, getName, getRemarks, getShortName, setIdentifier, setRemarks, setShortName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cts.Identifiable
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getName, getRemarks, getShortName, setRemarks, setShortName
 

Field Detail

coordinateSystem

protected CoordinateSystem coordinateSystem
The CoordinateSystem used by this CoordinateReferenceSystem.

Constructor Detail

GeodeticCRS

protected GeodeticCRS(Identifier identifier,
                      GeodeticDatum datum,
                      CoordinateSystem coordinateSystem)
Create a new GeodeticCRS.

Parameters:
identifier - the identifier of the GeodeticCRS
datum - the datum associated with the GeodeticCRS
coordSys - the coordinate system associated with the GeodeticCRS
Method Detail

getProjection

public Projection getProjection()
Description copied from interface: CoordinateReferenceSystem
Returns the Projection to which this CoordinateReferenceSystem is refering. It returns null if no projection is defined for this CRS.

Specified by:
getProjection in interface CoordinateReferenceSystem
See Also:
CoordinateReferenceSystem.getProjection()

getType

public abstract CoordinateReferenceSystem.Type getType()
Description copied from interface: CoordinateReferenceSystem
Returns this CoordinateReferenceSystem Type.

Specified by:
getType in interface CoordinateReferenceSystem
See Also:
CoordinateReferenceSystem.getType()

getCoordinateSystem

public CoordinateSystem getCoordinateSystem()
Description copied from interface: CoordinateReferenceSystem
Returns the CoordinateSystem used by this CoordinateReferenceSystem.

Specified by:
getCoordinateSystem in interface CoordinateReferenceSystem
See Also:
CoordinateReferenceSystem.getCoordinateSystem()

getDimension

public int getDimension()
Returns the number of dimensions of the CoordinateSystem used by this CoordinateReferenceSystem.


getDatum

public GeodeticDatum getDatum()
Returns the Datum to which this CoordinateReferenceSystem is refering.

Specified by:
getDatum in interface CoordinateReferenceSystem

isValid

public boolean isValid(double[] coord)
Return whether this coord is a valid coord in this CoordinateReferenceSystem.

Parameters:
coord - standard coordinate for this CoordinateReferenceSystem datums (ex. decimal degrees for geographic datums and meters for vertical datums).

addGridTransformation

public void addGridTransformation(GeodeticDatum gd,
                                  CoordinateOperation coordOp)
Add a Nadgrids Transformation for this CRS to the CRS using the key GeodeticDatum.

Parameters:
gd - the target GeodeticDatum of the nadgrid transformation to add
coordOp - the transformation linking this CRS and the target gd

getGridTransformations

public Map<GeodeticDatum,List<CoordinateOperation>> getGridTransformations()
Return the list of nadgrids transformation defined for this CRS.


getGridTransformations

public List<CoordinateOperation> getGridTransformations(GeodeticDatum datum)
Return the list of nadgrids transformation defined for this CRS that used the datum in parameter as target datum.

Parameters:
datum - the datum that must be a target for returned nadgrid transformation

addCRSTransformation

public void addCRSTransformation(CoordinateReferenceSystem crs,
                                 List<CoordinateOperation> opList)
Add a transformation for this CRS to the CRS in parameter.

Parameters:
crs - the target crs of the transformation to add
opList - the list of operations linking this and crs

getCRSTransformations

public Map<CoordinateReferenceSystem,List<CoordinateOperation>> getCRSTransformations()
Return the list of nadgrids transformations defined for this CRS.


getCRSTransformations

public List<CoordinateOperation> getCRSTransformations(CoordinateReferenceSystem crs)
Return the list of transformations defined for this CRS to the CRS in parameter.

Parameters:
crs - the crs that must be a target for returned list of operations

toGeographicCoordinateConverter

public abstract CoordinateOperation toGeographicCoordinateConverter()
                                                             throws NonInvertibleOperationException
Creates a CoordinateOperation object to convert coordinates from this CoordinateReferenceSystem to a GeographicReferenceSystem based on the same horizonal datum and vertical datum, and using normal SI units in the following order : latitude (rad), longitude (rad) height/altitude (m).

Throws:
NonInvertibleOperationException

fromGeographicCoordinateConverter

public abstract CoordinateOperation fromGeographicCoordinateConverter()
                                                               throws NonInvertibleOperationException
Creates a CoordinateOperation object to convert coordinates from a GeographicReferenceSystem based on the same horizonal datum and vertical datum, and using normal SI units in the following order : latitude (rad), longitude (rad) height/altitude (m) to this CoordinateReferenceSystem.

Throws:
NonInvertibleOperationException

toWKT

public abstract String toWKT()
Returns a WKT representation of the geodetic CRS.

Specified by:
toWKT in interface CoordinateReferenceSystem

toString

public String toString()
Return a String representation of this Datum.

Overrides:
toString in class IdentifiableComponent

equals

public boolean equals(Object o)
Returns true if object is equals to this. Tests equality between identifiers, then tests if the components of this ProjectedCRS are equals : the grids transformations, the GeodeticDatum, the CoordinateSystem.

Overrides:
equals in class IdentifiableComponent
Parameters:
object - The object to compare this GeodeticCRS against

hashCode

public int hashCode()
Returns the hash code for this GeodeticCRS.

Overrides:
hashCode in class IdentifiableComponent


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.