Class StandardDefinitions

java.lang.Object
org.apache.sis.referencing.StandardDefinitions

final class StandardDefinitions extends Object
Definitions of referencing objects identified by the CommonCRS enumeration values. This class is used only as a fallback if the objects cannot be fetched from the EPSG database. This class should not be loaded when a connection to an EPSG geodetic dataset is available.

This class uses data available in public sources, with all EPSG metadata omitted except the identifiers. The EPSG identifiers are provided as references where to find the complete definitions.

Since:
0.4
Version:
1.3
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final org.opengis.metadata.citation.Citation
    The authority for this subset of EPSG database.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final String
    The EPSG code for Greenwich meridian.
    private static final org.opengis.util.InternationalString
    Notice about the provenance of those data.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final short
    EPSG codes of coordinate systems supported by this class.
    (package private) static final String
    The EPSG database version that most closely match the fallback CRS.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    addWMS(Map<String,Object> properties, String code)
    Adds to the given properties an additional identifier in the "CRS" namespace.
    (package private) static org.opengis.referencing.cs.CoordinateSystemAxis
    createAxis(short code, boolean mandatory)
    Creates an axis from hard-coded values for the given code.
    (package private) static org.opengis.referencing.cs.CoordinateSystem
    createCoordinateSystem(short code, boolean mandatory)
    Creates a coordinate system from hard-coded values for the given code.
    (package private) static org.opengis.referencing.datum.Ellipsoid
    createEllipsoid(short code)
    Creates an ellipsoid from hard-coded values for the given code.
    (package private) static org.opengis.referencing.datum.GeodeticDatum
    createGeodeticDatum(short code, org.opengis.referencing.datum.Ellipsoid ellipsoid, org.opengis.referencing.datum.PrimeMeridian meridian)
    Creates a geodetic datum from hard-coded values for the given code.
    (package private) static org.opengis.referencing.crs.GeographicCRS
    createGeographicCRS(short code, org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.EllipsoidalCS cs)
    Creates a geodetic CRS from hard-coded values for the given code.
    (package private) static org.opengis.referencing.crs.ProjectedCRS
    createUniversal(int code, org.opengis.referencing.crs.GeographicCRS baseCRS, boolean isUTM, double latitude, double longitude, org.opengis.referencing.cs.CartesianCS derivedCS)
    Creates a Universal Transverse Mercator (UTM) or a Universal Polar Stereographic (UPS) projected CRS using the Apache SIS factory implementation.
    (package private) static org.opengis.referencing.crs.VerticalCRS
    createVerticalCRS(short code, org.opengis.referencing.datum.VerticalDatum datum)
    Creates a vertical CRS from hard-coded values for the given code.
    (package private) static org.opengis.referencing.datum.VerticalDatum
    createVerticalDatum(short code)
    Creates a vertical datum from hard-coded values for the given code.
    (package private) static org.opengis.referencing.datum.PrimeMeridian
    Creates the Greenwich prime meridian.
    private static Map<String,Object>
    properties(int code, String name, String alias, boolean world)
    Returns a map of properties for the given EPSG code, name and alias.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VERSION

      static final String VERSION
      The EPSG database version that most closely match the fallback CRS. We refer to latest version of the 9.x series instead of more recent data because the fallback CRS does not use datum ensemble.
      See Also:
    • GREENWICH

      static final String GREENWICH
      The EPSG code for Greenwich meridian.
      See Also:
    • NOTICE

      private static final org.opengis.util.InternationalString NOTICE
      Notice about the provenance of those data. This is provided as a small clarification because EPSG data should be licensed under EPSG Terms of Use. The approach in this class is to use only the data that are available from public sources, and to add only the EPSG codes as citation references. The notice text is:
      Definitions from public sources. When a definition corresponds to an EPSG object (ignoring metadata), the EPSG code is provided as a reference where to find the complete definition.
    • AUTHORITY

      static final org.opengis.metadata.citation.Citation AUTHORITY
      The authority for this subset of EPSG database.
    • ELLIPSOIDAL_2D

      static final short ELLIPSOIDAL_2D
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • ELLIPSOIDAL_3D

      static final short ELLIPSOIDAL_3D
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • SPHERICAL

      static final short SPHERICAL
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • EARTH_CENTRED

      static final short EARTH_CENTRED
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • CARTESIAN_2D

      static final short CARTESIAN_2D
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • UPS_NORTH

      static final short UPS_NORTH
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
    • UPS_SOUTH

      static final short UPS_SOUTH
      EPSG codes of coordinate systems supported by this class. We provide constants only for coordinate systems because those codes appear directly in method bodies, contrarily to other kinds of object where the code are stored in CommonCRS fields.
      See Also:
  • Constructor Details

    • StandardDefinitions

      private StandardDefinitions()
      Do not allow instantiation of this class.
  • Method Details

    • properties

      private static Map<String,Object> properties(int code, String name, String alias, boolean world)
      Returns a map of properties for the given EPSG code, name and alias.
      Parameters:
      code - the EPSG code, or 0 if none.
      name - the object name.
      alias - the alias, or null if none.
      world - true if the properties shall have an entry for the domain of validity.
      Returns:
      the map of properties to give to constructors or factory methods.
    • addWMS

      private static void addWMS(Map<String,Object> properties, String code)
      Adds to the given properties an additional identifier in the "CRS" namespace. This method presumes that the only identifier that existed before this method call was the EPSG one.
    • createUniversal

      static org.opengis.referencing.crs.ProjectedCRS createUniversal(int code, org.opengis.referencing.crs.GeographicCRS baseCRS, boolean isUTM, double latitude, double longitude, org.opengis.referencing.cs.CartesianCS derivedCS)
      Creates a Universal Transverse Mercator (UTM) or a Universal Polar Stereographic (UPS) projected CRS using the Apache SIS factory implementation. This method restricts the factory to SIS implementation instead of arbitrary factory in order to met the contract saying that CommonCRS methods should never fail.
      Parameters:
      code - the EPSG code, or 0 if none.
      baseCRS - the geographic CRS on which the projected CRS is based.
      isUTM - true for UTM or false for UPS. Note: redundant with the given latitude.
      latitude - a latitude in the zone of the desired projection, to be snapped to 0°, 90°S or 90°N.
      longitude - a longitude in the zone of the desired projection, to be snapped to UTM central meridian.
      derivedCS - the projected coordinate system.
    • createGeographicCRS

      static org.opengis.referencing.crs.GeographicCRS createGeographicCRS(short code, org.opengis.referencing.datum.GeodeticDatum datum, org.opengis.referencing.cs.EllipsoidalCS cs)
      Creates a geodetic CRS from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      datum - the geodetic datum.
      cs - the coordinate system.
      Returns:
      the geographic CRS for the given code.
    • createGeodeticDatum

      static org.opengis.referencing.datum.GeodeticDatum createGeodeticDatum(short code, org.opengis.referencing.datum.Ellipsoid ellipsoid, org.opengis.referencing.datum.PrimeMeridian meridian)
      Creates a geodetic datum from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      ellipsoid - the datum ellipsoid.
      meridian - the datum prime meridian.
      Returns:
      the geodetic datum for the given code.
    • createEllipsoid

      static org.opengis.referencing.datum.Ellipsoid createEllipsoid(short code)
      Creates an ellipsoid from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      Returns:
      the ellipsoid for the given code.
    • primeMeridian

      static org.opengis.referencing.datum.PrimeMeridian primeMeridian()
      Creates the Greenwich prime meridian. This is the only prime meridian supported by SIS convenience shortcuts. If another prime meridian is desired, the EPSG database shall be used.
    • createVerticalCRS

      static org.opengis.referencing.crs.VerticalCRS createVerticalCRS(short code, org.opengis.referencing.datum.VerticalDatum datum)
      Creates a vertical CRS from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      datum - the vertical datum.
      Returns:
      the vertical CRS for the given code.
    • createVerticalDatum

      static org.opengis.referencing.datum.VerticalDatum createVerticalDatum(short code)
      Creates a vertical datum from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      Returns:
      the vertical datum for the given code.
    • createCoordinateSystem

      static org.opengis.referencing.cs.CoordinateSystem createCoordinateSystem(short code, boolean mandatory)
      Creates a coordinate system from hard-coded values for the given code. The coordinate system names used by this method contains only the first part of the names declared in the EPSG database.
      Parameters:
      code - the EPSG code.
      mandatory - whether to fail or return null if the given code is unknown.
      Returns:
      the coordinate system for the given code.
    • createAxis

      static org.opengis.referencing.cs.CoordinateSystemAxis createAxis(short code, boolean mandatory)
      Creates an axis from hard-coded values for the given code.
      Parameters:
      code - the EPSG code.
      mandatory - whether to fail or return null if the given code is unknown.
      Returns:
      the coordinate system axis for the given code.