Class OperationMethodWrapper

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.OperationMethodWrapper
All Implemented Interfaces:
Serializable, org.opengis.metadata.Identifier, org.opengis.parameter.GeneralParameterDescriptor, org.opengis.parameter.GeneralParameterValue, org.opengis.parameter.ParameterDescriptorGroup, org.opengis.parameter.ParameterValueGroup, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod, org.opengis.referencing.ReferenceIdentifier

final class OperationMethodWrapper extends Wrapper implements org.opengis.referencing.operation.OperationMethod, org.opengis.parameter.ParameterDescriptorGroup, org.opengis.parameter.ParameterValueGroup, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final Projection
    The wrapped PROJ4 implementation.

    Fields inherited from class Wrapper

    BIDIMENSIONAL, TRIDIMENSIONAL

    Fields inherited from interface org.opengis.referencing.IdentifiedObject

    ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY

    Fields inherited from interface org.opengis.metadata.Identifier

    AUTHORITY_KEY, CODE_KEY

    Fields inherited from interface org.opengis.referencing.operation.OperationMethod

    FORMULA_KEY

    Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

    CODESPACE_KEY, VERSION_KEY
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Creates a new wrapper for the given PROJ4J implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.opengis.parameter.ParameterValueGroup
    Unsupported operation.
    org.opengis.parameter.ParameterValueGroup
    Returns a copy of this group of parameters.
    org.opengis.parameter.ParameterValueGroup
    Creates a new instance of this group of parameters.
    org.opengis.parameter.GeneralParameterDescriptor
    Returns the parameter descriptor of the given name.
    List<org.opengis.parameter.GeneralParameterDescriptor>
    Returns the descriptions of all parameters having a non-default value.
    final String
    Returns the operation method name.
    org.opengis.parameter.ParameterDescriptorGroup
    Returns the descriptors of parameters of the projection.
    org.opengis.referencing.operation.Formula
    Formula(s) or procedure used by this operation method.
    Set<org.opengis.referencing.ReferenceIdentifier>
    Returns the EPSG code of this method, if known.
    int
    Returns the maximum number of times that this parameter group is required.
    int
    Returns the minimum number of times that this parameter group is required.
    org.opengis.parameter.ParameterDescriptorGroup
    Returns the descriptors of parameters of the projection.
    Deprecated.
    This property has been removed in latest revision of ISO 19111.
    Deprecated.
    This property has been removed in latest revision of ISO 19111.
    List<org.opengis.parameter.ParameterValueGroup>
    groups(String name)
    Unsupported operation.
    (package private) final Object
    Returns the PROJ4J backing implementation.
    org.opengis.parameter.ParameterValue<?>
    Returns the parameter value of the given name.
    List<org.opengis.parameter.GeneralParameterValue>
    Returns the values of all parameters having a non-default value.
    (package private) static OperationMethodWrapper
    Wraps the given implementation.
    (package private) static OperationMethodWrapper
    Wraps the target CRS of the given transform.

    Methods inherited from class Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.referencing.IdentifiedObject

    getAlias, getName, getRemarks, toWKT
  • Field Details

    • impl

      final Projection impl
      The wrapped PROJ4 implementation.
  • Constructor Details

    • OperationMethodWrapper

      private OperationMethodWrapper(Projection impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • wrap

      static OperationMethodWrapper wrap(Projection impl)
      Wraps the given implementation.
      Parameters:
      impl - the implementation to wrap, or null
      Returns:
      the wrapper, or null if the given implementation was null
    • wrapTarget

      static OperationMethodWrapper wrapTarget(CoordinateTransform impl)
      Wraps the target CRS of the given transform.
      Parameters:
      impl - the implementation to wrap, or null
      Returns:
      the wrapper, or null if none
    • implementation

      final Object implementation()
      Returns the PROJ4J backing implementation..
      Specified by:
      implementation in class Wrapper
      Returns:
      the PROJ4J backing implementation
    • getCode

      public final String getCode()
      Returns the operation method name.. In the PROJ4J implementations, the Projection.toString() method seems to be the method name. However, this is not formalized in the Javadoc.
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Specified by:
      getCode in class Wrapper
      Returns:
      the operation method name
    • getIdentifiers

      public Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
      Returns the EPSG code of this method, if known..
      Specified by:
      getIdentifiers in interface org.opengis.referencing.IdentifiedObject
      Overrides:
      getIdentifiers in class Wrapper
      Returns:
      the EPSG code of this method, if known
    • getFormula

      public org.opengis.referencing.operation.Formula getFormula()
      Formula(s) or procedure used by this operation method. This information is not provided.
      Specified by:
      getFormula in interface org.opengis.referencing.operation.OperationMethod
    • getSourceDimensions

      @Deprecated public Integer getSourceDimensions()
      Deprecated.
      This property has been removed in latest revision of ISO 19111.
      Specified by:
      getSourceDimensions in interface org.opengis.referencing.operation.OperationMethod
    • getTargetDimensions

      @Deprecated public Integer getTargetDimensions()
      Deprecated.
      This property has been removed in latest revision of ISO 19111.
      Specified by:
      getTargetDimensions in interface org.opengis.referencing.operation.OperationMethod
    • getMinimumOccurs

      public int getMinimumOccurs()
      Returns the minimum number of times that this parameter group is required..
      Specified by:
      getMinimumOccurs in interface org.opengis.parameter.GeneralParameterDescriptor
      Returns:
      the minimum number of times that this parameter group is required
    • getMaximumOccurs

      public int getMaximumOccurs()
      Returns the maximum number of times that this parameter group is required..
      Specified by:
      getMaximumOccurs in interface org.opengis.parameter.GeneralParameterDescriptor
      Returns:
      the maximum number of times that this parameter group is required
    • getParameters

      public org.opengis.parameter.ParameterDescriptorGroup getParameters()
      Returns the descriptors of parameters of the projection.. This method is defined in OperationMethod.
      Specified by:
      getParameters in interface org.opengis.referencing.operation.OperationMethod
      Returns:
      the descriptors of parameters of the projection
    • getDescriptor

      public org.opengis.parameter.ParameterDescriptorGroup getDescriptor()
      Returns the descriptors of parameters of the projection.. This method is defined in ParameterValueGroup.
      Specified by:
      getDescriptor in interface org.opengis.parameter.GeneralParameterValue
      Specified by:
      getDescriptor in interface org.opengis.parameter.ParameterValueGroup
      Returns:
      the descriptors of parameters of the projection
    • descriptors

      public List<org.opengis.parameter.GeneralParameterDescriptor> descriptors()
      Returns the descriptions of all parameters having a non-default value.. The check for non-default values is a heuristic rule for identifying which parameters are used by the PROJ4J Projection instance.
      Specified by:
      descriptors in interface org.opengis.parameter.ParameterDescriptorGroup
      Returns:
      the descriptions of all parameters having a non-default value
    • values

      public List<org.opengis.parameter.GeneralParameterValue> values()
      Returns the values of all parameters having a non-default value.. The check for non-default values is a heuristic rule for identifying which parameters are used by the PROJ4J Projection instance.
      Specified by:
      values in interface org.opengis.parameter.ParameterValueGroup
      Returns:
      the values of all parameters having a non-default value
    • descriptor

      public org.opengis.parameter.GeneralParameterDescriptor descriptor(String name) throws org.opengis.parameter.ParameterNotFoundException
      Returns the parameter descriptor of the given name.
      Specified by:
      descriptor in interface org.opengis.parameter.ParameterDescriptorGroup
      Parameters:
      name - name of the desired parameter
      Returns:
      parameter descriptor for the given name
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given name is unknown
    • parameter

      public org.opengis.parameter.ParameterValue<?> parameter(String name) throws org.opengis.parameter.ParameterNotFoundException
      Returns the parameter value of the given name.
      Specified by:
      parameter in interface org.opengis.parameter.ParameterValueGroup
      Parameters:
      name - name of the desired parameter
      Returns:
      parameter value for the given name
      Throws:
      org.opengis.parameter.ParameterNotFoundException - if the given name is unknown
    • groups

      public List<org.opengis.parameter.ParameterValueGroup> groups(String name) throws org.opengis.parameter.ParameterNotFoundException
      Unsupported operation.
      Specified by:
      groups in interface org.opengis.parameter.ParameterValueGroup
      Throws:
      org.opengis.parameter.ParameterNotFoundException
    • addGroup

      public org.opengis.parameter.ParameterValueGroup addGroup(String name) throws org.opengis.parameter.ParameterNotFoundException, IllegalStateException
      Unsupported operation.
      Specified by:
      addGroup in interface org.opengis.parameter.ParameterValueGroup
      Throws:
      org.opengis.parameter.ParameterNotFoundException
      IllegalStateException
    • createValue

      public org.opengis.parameter.ParameterValueGroup createValue()
      Creates a new instance of this group of parameters. All accessible parameters are set to their default value.
      Specified by:
      createValue in interface org.opengis.parameter.GeneralParameterDescriptor
      Specified by:
      createValue in interface org.opengis.parameter.ParameterDescriptorGroup
    • clone

      public org.opengis.parameter.ParameterValueGroup clone()
      Returns a copy of this group of parameters..
      Specified by:
      clone in interface org.opengis.parameter.GeneralParameterValue
      Specified by:
      clone in interface org.opengis.parameter.ParameterValueGroup
      Overrides:
      clone in class Object
      Returns:
      a copy of this group of parameters