Class 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

class DefaultGeodeticCRS extends AbstractCRS implements org.opengis.referencing.crs.GeodeticCRS
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 Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
    • datum

      private org.opengis.referencing.datum.GeodeticDatum datum
      The 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

      public Class<? extends org.opengis.referencing.crs.GeodeticCRS> getInterface()
      Returns the GeoAPI interface implemented by this class. The SIS implementation returns GeodeticCRS.class. Subclasses implementing a more specific GeoAPI interface shall override this method.
      Overrides:
      getInterface in class AbstractCRS
      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). If DefaultGeodeticCRS is made public in a future SIS version, then we could remove the overridden methods.
      Specified by:
      getDatum in interface org.opengis.referencing.crs.GeodeticCRS
      Specified by:
      getDatum in interface org.opengis.referencing.crs.SingleCRS
      Overrides:
      getDatum in class AbstractCRS
      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 all DefaultGeodeticCRS subclasses in this package.
      Overrides:
      createSameType in class AbstractCRS
    • formatTo

      protected String formatTo(Formatter formatter)
      Formats this CRS as a Well Known Text GeodeticCRS[…] element. More information about the WKT format is documented in subclasses.
      Overrides:
      formatTo in class AbstractCRS
      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 for DefaultParameterValue 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)