Package org.apache.sis.referencing.crs
Class DefaultGeodeticCRS
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.AbstractReferenceSystem
org.apache.sis.referencing.crs.AbstractCRS
org.apache.sis.referencing.crs.DefaultGeodeticCRS
- All Implemented Interfaces:
Serializable
,Formattable
,Deprecable
,LenientComparable
,org.opengis.referencing.crs.CoordinateReferenceSystem
,org.opengis.referencing.crs.GeodeticCRS
,org.opengis.referencing.crs.SingleCRS
,org.opengis.referencing.IdentifiedObject
,org.opengis.referencing.ReferenceSystem
- Direct Known Subclasses:
DefaultGeocentricCRS
,DefaultGeographicCRS
A 2- or 3-dimensional coordinate reference system based on a geodetic datum.
The CRS is geographic if associated with an ellipsoidal coordinate system,
or geocentric if associated with a spherical or Cartesian coordinate system.
Used with datum type:
Geodetic.
Used with coordinate system types:
Cartesian,
Spherical or
Ellipsoidal.
- Since:
- 0.4
- Version:
- 0.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.referencing.datum.GeodeticDatum
The datum.private static final long
Serial number for inter-operability with different versions.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEY
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Fields inherited from interface org.opengis.referencing.ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
-
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
Constructs a new object in which every attributes are set to a null value.(package private)
DefaultGeodeticCRS
(Map<String, ?> properties, org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.CoordinateSystem cs) Creates a coordinate reference system from the given properties, datum and coordinate system.protected
DefaultGeodeticCRS
(org.opengis.referencing.crs.GeodeticCRS crs) Constructs a new coordinate reference system with the same values than the specified one. -
Method Summary
Modifier and TypeMethodDescription(package private) AbstractCRS
createSameType
(Map<String, ?> properties, org.opengis.referencing.cs.CoordinateSystem cs) Returns a coordinate reference system of the same type than this CRS but with different axes.protected String
Formats this CRS as a Well Known TextGeodeticCRS[…]
element.private org.opengis.referencing.cs.CartesianCS
org.opengis.referencing.datum.GeodeticDatum
getDatum()
Returns the datum.private org.opengis.referencing.cs.EllipsoidalCS
Invoked by JAXB at marshalling time.Class<? extends org.opengis.referencing.crs.GeodeticCRS>
Returns the GeoAPI interface implemented by this class.private org.opengis.referencing.cs.SphericalCS
private void
setCartesianCS
(org.opengis.referencing.cs.CartesianCS cs) private void
setDatum
(org.opengis.referencing.datum.GeodeticDatum value) Invoked by JAXB at unmarshalling time.private void
setEllipsoidalCS
(org.opengis.referencing.cs.EllipsoidalCS cs) Invoked by JAXB at unmarshalling time.private void
setSphericalCS
(org.opengis.referencing.cs.SphericalCS cs) Methods inherited from class org.apache.sis.referencing.crs.AbstractCRS
castOrCopy, computeHashCode, equals, forConvention, formatCS, getCached, getCoordinateSystem, getCoordinateSystem, isBaseCRS, setCached, setCoordinateSystem
Methods inherited from class org.apache.sis.referencing.AbstractReferenceSystem
getDomainOfValidity, getScope
Methods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
Methods inherited from interface org.opengis.referencing.ReferenceSystem
getDomainOfValidity, getScope
Methods inherited from interface org.opengis.referencing.crs.SingleCRS
getCoordinateSystem
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
datum
private org.opengis.referencing.datum.GeodeticDatum datumThe datum.Consider this field as final! This field is modified only at unmarshalling time by
setDatum(GeodeticDatum)
- See Also:
-
-
Constructor Details
-
DefaultGeodeticCRS
DefaultGeodeticCRS(Map<String, ?> properties, org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.CoordinateSystem cs) Creates a coordinate reference system from the given properties, datum and coordinate system. The properties given in argument follow the same rules than for the super-class constructor.This constructor is not public because it does not verify the
cs
type.- Parameters:
properties
- the properties to be given to the coordinate reference system.datum
- the datum.cs
- the coordinate system.
-
DefaultGeodeticCRS
protected DefaultGeodeticCRS(org.opengis.referencing.crs.GeodeticCRS crs) Constructs a new coordinate reference system with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS 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.
-
DefaultGeodeticCRS
DefaultGeodeticCRS()Constructs a new object in which every attributes are set to a null value. This is not a valid object. This constructor is strictly reserved to JAXB, which will assign values to the fields using reflection.
-
-
Method Details
-
getInterface
Returns the GeoAPI interface implemented by this class. The SIS implementation returnsGeodeticCRS.class
. Subclasses implementing a more specific GeoAPI interface shall override this method.- Overrides:
getInterface
in classAbstractCRS
- Returns:
- the coordinate reference system interface implemented by this class.
-
getDatum
public org.opengis.referencing.datum.GeodeticDatum getDatum()Returns the datum. This method is overridden is subclasses for documentation purpose only, mostly for showing this method in the appropriate position in javadoc (instead of at the bottom of the page). IfDefaultGeodeticCRS
is made public in a future SIS version, then we could remove the overridden methods.- Specified by:
getDatum
in interfaceorg.opengis.referencing.crs.GeodeticCRS
- Specified by:
getDatum
in interfaceorg.opengis.referencing.crs.SingleCRS
- Overrides:
getDatum
in classAbstractCRS
- Returns:
- the datum.
-
createSameType
AbstractCRS createSameType(Map<String, ?> properties, org.opengis.referencing.cs.CoordinateSystem cs) Returns a coordinate reference system of the same type than this CRS but with different axes. This method shall be overridden by allDefaultGeodeticCRS
subclasses in this package.- Overrides:
createSameType
in classAbstractCRS
-
formatTo
Formats this CRS as a Well Known TextGeodeticCRS[…]
element. More information about the WKT format is documented in subclasses.- Overrides:
formatTo
in classAbstractCRS
- Parameters:
formatter
- the formatter where to format the inner content of this WKT element.- Returns:
"GeodeticCRS"
(WKT 2) or"GeogCS"
/"GeocCS"
(WKT 1).- See Also:
-
setDatum
private void setDatum(org.opengis.referencing.datum.GeodeticDatum value) Invoked by JAXB at unmarshalling time.- See Also:
-
getEllipsoidalCS
private org.opengis.referencing.cs.EllipsoidalCS getEllipsoidalCS()Invoked by JAXB at marshalling time.Implementation note: The usual way to handle<xs:choice>
with JAXB is to annotate a single method like below: However, our attempts to apply this approach worked forDefaultParameterValue
but not for this class: for an unknown reason, the unmarshalled CS object is empty.- See Also:
-
getCartesianCS
private org.opengis.referencing.cs.CartesianCS getCartesianCS() -
getSphericalCS
private org.opengis.referencing.cs.SphericalCS getSphericalCS() -
setEllipsoidalCS
private void setEllipsoidalCS(org.opengis.referencing.cs.EllipsoidalCS cs) Invoked by JAXB at unmarshalling time.- See Also:
-
setCartesianCS
private void setCartesianCS(org.opengis.referencing.cs.CartesianCS cs) -
setSphericalCS
private void setSphericalCS(org.opengis.referencing.cs.SphericalCS cs)
-