Class OperationMethodWrapper

  • All Implemented Interfaces:
    java.io.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, java.io.Serializable
    Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Projection impl
      The wrapped PROJ4 implementation.
      • 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 OperationMethodWrapper​(Projection impl)
      Creates a new wrapper for the given PROJ4J implementation.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.opengis.parameter.ParameterValueGroup addGroup​(java.lang.String name)
      Unsupported operation.
      org.opengis.parameter.ParameterValueGroup clone()
      {@return a copy of this group of parameters}.
      org.opengis.parameter.ParameterValueGroup createValue()
      Creates a new instance of this group of parameters.
      org.opengis.parameter.GeneralParameterDescriptor descriptor​(java.lang.String name)
      Returns the parameter descriptor of the given name.
      java.util.List<org.opengis.parameter.GeneralParameterDescriptor> descriptors()
      {@return the descriptions of all parameters having a non-default value}.
      java.lang.String getCode()
      {@return the operation method name}.
      org.opengis.parameter.ParameterDescriptorGroup getDescriptor()
      {@return the descriptors of parameters of the projection}.
      org.opengis.referencing.operation.Formula getFormula()
      Formula(s) or procedure used by this operation method.
      java.util.Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
      {@return the EPSG code of this method, if known}.
      int getMaximumOccurs()
      {@return the maximum number of times that this parameter group is required}.
      int getMinimumOccurs()
      {@return the minimum number of times that this parameter group is required}.
      org.opengis.parameter.ParameterDescriptorGroup getParameters()
      {@return the descriptors of parameters of the projection}.
      java.lang.Integer getSourceDimensions()
      Deprecated.
      This property has been removed in latest revision of ISO 19111.
      java.lang.Integer getTargetDimensions()
      Deprecated.
      This property has been removed in latest revision of ISO 19111.
      java.util.List<org.opengis.parameter.ParameterValueGroup> groups​(java.lang.String name)
      Unsupported operation.
      (package private) java.lang.Object implementation()
      {@return the PROJ4J backing implementation}.
      org.opengis.parameter.ParameterValue<?> parameter​(java.lang.String name)
      Returns the parameter value of the given name.
      java.util.List<org.opengis.parameter.GeneralParameterValue> values()
      {@return the values of all parameters having a non-default value}.
      (package private) static OperationMethodWrapper wrap​(Projection impl)
      Wraps the given implementation.
      (package private) static OperationMethodWrapper wrapTarget​(CoordinateTransform impl)
      Wraps the target CRS of the given transform.
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.opengis.referencing.IdentifiedObject

        getAlias, getName, getRemarks, toWKT
    • Field Detail

      • impl

        final Projection impl
        The wrapped PROJ4 implementation.
    • Constructor Detail

      • OperationMethodWrapper

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

      • 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 java.lang.Object implementation()
        {@return the PROJ4J backing implementation}.
        Specified by:
        implementation in class Wrapper
      • getCode

        public final java.lang.String getCode()
        {@return 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
      • getIdentifiers

        public java.util.Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
        {@return the EPSG code of this method, if known}.
        Specified by:
        getIdentifiers in interface org.opengis.referencing.IdentifiedObject
        Overrides:
        getIdentifiers in class Wrapper
      • 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 java.lang.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 java.lang.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()
        {@return the minimum number of times that this parameter group is required}.
        Specified by:
        getMinimumOccurs in interface org.opengis.parameter.GeneralParameterDescriptor
      • getMaximumOccurs

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

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

        public org.opengis.parameter.ParameterDescriptorGroup getDescriptor()
        {@return 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
      • descriptors

        public java.util.List<org.opengis.parameter.GeneralParameterDescriptor> descriptors()
        {@return 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
      • values

        public java.util.List<org.opengis.parameter.GeneralParameterValue> values()
        {@return 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
      • descriptor

        public org.opengis.parameter.GeneralParameterDescriptor descriptor​(java.lang.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​(java.lang.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 java.util.List<org.opengis.parameter.ParameterValueGroup> groups​(java.lang.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​(java.lang.String name)
                                                           throws org.opengis.parameter.ParameterNotFoundException,
                                                                  java.lang.IllegalStateException
        Unsupported operation.
        Specified by:
        addGroup in interface org.opengis.parameter.ParameterValueGroup
        Throws:
        org.opengis.parameter.ParameterNotFoundException
        java.lang.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()
        {@return 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 java.lang.Object