Package org.locationtech.proj4j.geoapi
Class OperationMethodWrapper
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.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 class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
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 org.locationtech.proj4j.geoapi.Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getName, getRemarks, getScope, getVersion, hashCode, toString, 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, ornull
- 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, ornull
- Returns:
- the wrapper, or
null
if none
-
implementation
final java.lang.Object implementation()
{@return the PROJ4J backing implementation}.- Specified by:
implementation
in classWrapper
-
getCode
public final java.lang.String getCode()
{@return the operation method name}. In the PROJ4J implementations, theProjection.toString()
method seems to be the method name. However, this is not formalized in the Javadoc.
-
getIdentifiers
public java.util.Set<org.opengis.referencing.ReferenceIdentifier> getIdentifiers()
{@return the EPSG code of this method, if known}.- Specified by:
getIdentifiers
in interfaceorg.opengis.referencing.IdentifiedObject
- Overrides:
getIdentifiers
in classWrapper
-
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 interfaceorg.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 interfaceorg.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 interfaceorg.opengis.referencing.operation.OperationMethod
-
getMinimumOccurs
public int getMinimumOccurs()
{@return the minimum number of times that this parameter group is required}.- Specified by:
getMinimumOccurs
in interfaceorg.opengis.parameter.GeneralParameterDescriptor
-
getMaximumOccurs
public int getMaximumOccurs()
{@return the maximum number of times that this parameter group is required}.- Specified by:
getMaximumOccurs
in interfaceorg.opengis.parameter.GeneralParameterDescriptor
-
getParameters
public org.opengis.parameter.ParameterDescriptorGroup getParameters()
{@return the descriptors of parameters of the projection}. This method is defined inOperationMethod
.- Specified by:
getParameters
in interfaceorg.opengis.referencing.operation.OperationMethod
-
getDescriptor
public org.opengis.parameter.ParameterDescriptorGroup getDescriptor()
{@return the descriptors of parameters of the projection}. This method is defined inParameterValueGroup
.- Specified by:
getDescriptor
in interfaceorg.opengis.parameter.GeneralParameterValue
- Specified by:
getDescriptor
in interfaceorg.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 PROJ4JProjection
instance.- Specified by:
descriptors
in interfaceorg.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 PROJ4JProjection
instance.- Specified by:
values
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.opengis.parameter.GeneralParameterDescriptor
- Specified by:
createValue
in interfaceorg.opengis.parameter.ParameterDescriptorGroup
-
clone
public org.opengis.parameter.ParameterValueGroup clone()
{@return a copy of this group of parameters}.- Specified by:
clone
in interfaceorg.opengis.parameter.GeneralParameterValue
- Specified by:
clone
in interfaceorg.opengis.parameter.ParameterValueGroup
- Overrides:
clone
in classjava.lang.Object
-
-