org.geotoolkit.referencing.crs
Class DefaultGeocentricCRS

Object
  extended by FormattableObject
      extended by AbstractIdentifiedObject
          extended by AbstractReferenceSystem
              extended by AbstractCRS
                  extended by AbstractSingleCRS
                      extended by DefaultGeocentricCRS
All Implemented Interfaces:
Serializable, Formattable, LenientComparable, CoordinateReferenceSystem, GeocentricCRS, GeodeticCRS, SingleCRS, IdentifiedObject, ReferenceSystem

@Immutable
public class DefaultGeocentricCRS
extends AbstractSingleCRS
implements GeocentricCRS

A 3D coordinate reference system with the origin at the approximate centre of mass of the earth. A geocentric CRS deals with the earth's curvature by taking a 3D spatial view, which obviates the need to model the earth's curvature.

Used with CS type(s)
Cartesian, Spherical

Since:
1.2
Version:
3.19
Author:
Martin Desruisseaux (IRD, Geomatys)
See Also:
Serialized Form
Module:
referencing/geotk-referencing (download)    View source code for this class

Field Summary
static DefaultGeocentricCRS CARTESIAN
          The default geocentric CRS with a Cartesian coordinate system.
static DefaultGeocentricCRS SPHERICAL
          The default geocentric CRS with a spherical coordinate system.
 
Fields inherited from class FormattableObject
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE
 
Fields inherited from interface ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultGeocentricCRS(GeocentricCRS crs)
          Constructs a new geocentric CRS with the same values than the specified one.
DefaultGeocentricCRS(Map<String,?> properties, GeodeticDatum datum, CartesianCS cs)
          Constructs a geographic CRS from a set of properties.
DefaultGeocentricCRS(Map<String,?> properties, GeodeticDatum datum, SphericalCS cs)
          Constructs a geographic CRS from a set of properties.
DefaultGeocentricCRS(String name, GeodeticDatum datum, CartesianCS cs)
          Constructs a geocentric CRS from a name.
DefaultGeocentricCRS(String name, GeodeticDatum datum, SphericalCS cs)
          Constructs a geocentric CRS from a name.
 
Method Summary
static DefaultGeocentricCRS castOrCopy(GeocentricCRS object)
          Returns a Geotk CRS implementation with the same values than the given arbitrary implementation.
 String formatWKT(Formatter formatter)
          Formats the inner part of a Well Known Text (WKT) element.
 GeodeticDatum getDatum()
          Returns the datum.
static DefaultGeocentricCRS wrap(GeocentricCRS object)
          Deprecated. Renamed castOrCopy.
 
Methods inherited from class AbstractSingleCRS
computeHashCode, equals, getAxis, getDimension
 
Methods inherited from class AbstractCRS
distance, getCoordinateSystem
 
Methods inherited from class AbstractReferenceSystem
getDomainOfValidity, getScope
 
Methods inherited from class AbstractIdentifiedObject
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches
 
Methods inherited from class FormattableObject
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface GeocentricCRS
getCoordinateSystem
 
Methods inherited from interface ReferenceSystem
getDomainOfValidity, getScope
 
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Field Detail

CARTESIAN

public static final DefaultGeocentricCRS CARTESIAN
The default geocentric CRS with a Cartesian coordinate system. Prime meridian is Greenwich, geodetic datum is WGS84 and linear units are metres. The X axis points towards the prime meridian. The Y axis points East. The Z axis points North.


SPHERICAL

public static final DefaultGeocentricCRS SPHERICAL
The default geocentric CRS with a spherical coordinate system. Prime meridian is Greenwich, geodetic datum is WGS84 and linear units are metres.

Constructor Detail

DefaultGeocentricCRS

public DefaultGeocentricCRS(GeocentricCRS crs)
Constructs a new geocentric CRS with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a Geotk one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.

Parameters:
crs - The coordinate reference system to copy.
Since:
2.2

DefaultGeocentricCRS

public DefaultGeocentricCRS(String name,
                            GeodeticDatum datum,
                            CartesianCS cs)
Constructs a geocentric CRS from a name.

Parameters:
name - The name.
datum - The datum.
cs - The coordinate system.

DefaultGeocentricCRS

public DefaultGeocentricCRS(String name,
                            GeodeticDatum datum,
                            SphericalCS cs)
Constructs a geocentric CRS from a name.

Parameters:
name - The name.
datum - The datum.
cs - The coordinate system.

DefaultGeocentricCRS

public DefaultGeocentricCRS(Map<String,?> properties,
                            GeodeticDatum datum,
                            CartesianCS cs)
Constructs a geographic CRS from a set of properties. The properties are given unchanged to the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least "name".
datum - The datum.
cs - The coordinate system.

DefaultGeocentricCRS

public DefaultGeocentricCRS(Map<String,?> properties,
                            GeodeticDatum datum,
                            SphericalCS cs)
Constructs a geographic CRS from a set of properties. The properties are given unchanged to the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least "name".
datum - The datum.
cs - The coordinate system.
Method Detail

castOrCopy

public static DefaultGeocentricCRS castOrCopy(GeocentricCRS object)
Returns a Geotk CRS implementation with the same values than the given arbitrary implementation. If the given object is null, then this method returns null. Otherwise if the given object is already a Geotk implementation, then the given object is returned unchanged. Otherwise a new Geotk implementation is created and initialized to the attribute values of the given object.

Parameters:
object - The object to get as a Geotk implementation, or null if none.
Returns:
A Geotk implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
Since:
3.18

wrap

@Deprecated
public static DefaultGeocentricCRS wrap(GeocentricCRS object)
Deprecated. Renamed castOrCopy.

Parameters:
object - The object to get as a Geotk implementation, or null if none.
Returns:
The given object as a Geotk implementation.

getDatum

public GeodeticDatum getDatum()
Returns the datum.

Specified by:
getDatum in interface GeodeticCRS
Specified by:
getDatum in interface SingleCRS
Overrides:
getDatum in class AbstractSingleCRS
Returns:
The datum.

formatWKT

public String formatWKT(Formatter formatter)
Formats the inner part of a Well Known Text (WKT) element.

Specified by:
formatWKT in interface Formattable
Overrides:
formatWKT in class AbstractCRS
Parameters:
formatter - The formatter to use.
Returns:
The name of the WKT element type, which is "GEOCCS".
See Also:
FormattableObject.toWKT(), FormattableObject.toString()


Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.