Class Wrapper

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
All Implemented Interfaces:
org.opengis.metadata.Identifier, org.opengis.referencing.ReferenceIdentifier
Direct Known Subclasses:
AbstractCRS, AuthorityFactoryWrapper, Axis, DatumWrapper, EllipsoidWrapper, IdentifierEPSG, OperationFactoryWrapper, OperationMethodWrapper, ParameterAccessor, ParameterWrapper, PositionWrapper, PrimeMeridianWrapper, TransformWrapper

abstract class Wrapper extends Object implements org.opengis.referencing.ReferenceIdentifier
Base class for wrappers around PROJ4J implementations. Subclasses should return the object name in the getCode() method.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final int
    The default number of dimensions of the CRS.
    (package private) static final int
    The number of dimensions when a non-NaN z coordinate value is provided.

    Fields inherited from interface org.opengis.metadata.Identifier

    AUTHORITY_KEY, CODE_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

    CODESPACE_KEY, VERSION_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new wrapper.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object other)
    Compares this wrapper with the given object for equality.
    Collection<org.opengis.util.GenericName>
    Returns other names of this object.
    org.opengis.metadata.citation.Citation
    Returns the authority that defines this object.
    abstract String
    Returns the primary object name.
    Returns a short name of the authority used as a code space.
    org.opengis.metadata.extent.Extent
    Returns the domain of validity of this object.
    Set<org.opengis.referencing.ReferenceIdentifier>
    Returns all identifiers (usually EPSG codes) of this object.
    final org.opengis.referencing.ReferenceIdentifier
    Returns the primary object name.
    org.opengis.util.InternationalString
    Returns optional remarks about this object.
    org.opengis.util.InternationalString
    Returns the scope of usage of this object.
    Returns the version of the defined object.
    final int
    Returns a hash code value for this wrapper.
    (package private) abstract Object
    Returns the wrapped implementation.
    Returns the string representation of the wrapped PROJ4J object.
    Returns a WKT representation of this object.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • BIDIMENSIONAL

      static final int BIDIMENSIONAL
      The default number of dimensions of the CRS.
      See Also:
    • TRIDIMENSIONAL

      static final int TRIDIMENSIONAL
      The number of dimensions when a non-NaN z coordinate value is provided.
      See Also:
  • Constructor Details

    • Wrapper

      Wrapper()
      Creates a new wrapper.
  • Method Details

    • implementation

      abstract Object implementation()
      Returns the wrapped implementation..
      Returns:
      the wrapped implementation
    • getAuthority

      public org.opengis.metadata.citation.Citation getAuthority()
      Returns the authority that defines this object.. The default implementation assumes that there is none.
      Specified by:
      getAuthority in interface org.opengis.metadata.Identifier
      Returns:
      the authority that defines this object
    • getCodeSpace

      public String getCodeSpace()
      Returns a short name of the authority used as a code space.. The default implementation returns "PROJ4J" on the assumption that the names are specific to PROJ4J. This is not completely true since those names are often derived from EPSG, but we don't really have a guarantee that they are exact or that PROJ4J didn't added their own definitions.
      Specified by:
      getCodeSpace in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      a short name of the authority used as a code space
    • getVersion

      public String getVersion()
      Returns the version of the defined object.. The default implementation assumes that there is none.
      Specified by:
      getVersion in interface org.opengis.referencing.ReferenceIdentifier
      Returns:
      the version of the defined object
    • getCode

      public abstract String getCode()
      Returns the primary object name.. In the EPSG database, this is usually the long name.
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Returns:
      the primary object name
    • getName

      public final org.opengis.referencing.ReferenceIdentifier getName()
      Returns the primary object name.. This method returns this, with the expectation that users will follow with getCode(). Subclasses shall return the actual object name in getCode().

      This is a method declared in the IdentifiedObject interface. It is implemented in this base class for the convenience of subclasses that indirectly implement IdentifiedObject.

      Returns:
      the primary object name
    • getAlias

      public Collection<org.opengis.util.GenericName> getAlias()
      Returns other names of this object.. In the EPSG database, this is usually the short name. The default implementation assumes that there is none.

      This is a method declared in the IdentifiedObject interface. It is implemented in this base class for the convenience of subclasses that indirectly implement IdentifiedObject.

      Returns:
      other names of this object
    • getIdentifiers

      public Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
      Returns all identifiers (usually EPSG codes) of this object.. The default implementation assumes that there is none.

      This is a method declared in the IdentifiedObject interface. It is implemented in this base class for the convenience of subclasses that indirectly implement IdentifiedObject.

      Returns:
      all identifiers (usually EPSG codes) of this object
    • getScope

      public org.opengis.util.InternationalString getScope()
      Returns the scope of usage of this object.. If unknown, ISO 19111 requires that we return "not known".

      This method is not declared directly in the IdentifiedObject interface, but appears in datum and coordinate operation sub-interfaces.

      Returns:
      the scope of usage of this object
    • getDomainOfValidity

      public org.opengis.metadata.extent.Extent getDomainOfValidity()
      Returns the domain of validity of this object.. The default implementation assumes that there is none.

      This method is not declared directly in the IdentifiedObject interface, but appears in datum and coordinate operation sub-interfaces.

      Returns:
      the domain of validity of this object
    • getRemarks

      public org.opengis.util.InternationalString getRemarks()
      Returns optional remarks about this object.. The default implementation assumes that there is none.

      This is a method declared in the IdentifiedObject interface. It is implemented in this base class for the convenience of subclasses that indirectly implement IdentifiedObject.

      Returns:
      optional remarks about this object
    • toWKT

      public String toWKT() throws UnsupportedOperationException
      Returns a WKT representation of this object.. The default implementation assumes that there is none.

      This is a method declared in the IdentifiedObject interface. It is implemented in this base class for the convenience of subclasses that indirectly implement IdentifiedObject.

      Returns:
      a WKT representation of this object
      Throws:
      UnsupportedOperationException
    • toString

      public String toString()
      Returns the string representation of the wrapped PROJ4J object..
      Overrides:
      toString in class Object
      Returns:
      the string representation of the wrapped PROJ4J object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this wrapper..
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this wrapper
    • equals

      public final boolean equals(Object other)
      Compares this wrapper with the given object for equality. This method returns true if the two objects are wrappers of the same class wrapping equal PROJ4 implementations.
      Overrides:
      equals in class Object