Package org.opengis.parameter
Parameters are described extensively in the OpenGIS® Spatial Referencing by Coordinates (Topic 2) specification, but appear also in other specifications like Metadata and Web Processing Services. This GeoAPI package is derived mostly from the referencing model (ISO 19111), augmented with some properties from the metadata model (ISO 19115 and ISO 19157) in order to provide a unified framework for all standards.
Interfaces in this package can be grouped in two categories:
- Parameter descriptors are immutable types that describes the parameters needed by an operation or a process. Descriptors contain information like parameter name, optionality, repeatability and value type, but do not contain the actual parameter value.
- Parameter values are mutable (descriptor, value) tuples, together with convenience methods for searching a single parameter for a given name, performing unit conversions and getting the values as instances of some commonly used types.
Parameter descriptor | Parameter value |
---|---|
IdentifiedObject └─ GeneralParameterDescriptor ├─ ParameterDescriptor └─ ParameterDescriptorGroup |
|
OperationMethod
.
Parameter value instances are created by GeneralParameterDescriptor.createValue()
.
Coordinate Operation parameters
Most parameter values are real numbers. Those values can be obtained by the
ParameterValue.doubleValue()
method.
But for some operation methods, notably those implementing a grid interpolation algorithm, the parameter
value could be a file name or URI. Those values can be obtained by the
ParameterValue.getValue()
method.
Note that such URI may be valid only for some locations.
An example is the coordinate transformation from NAD 27 to NAD 83 in the USA; depending
on the locations of the points to be transformed, one of a series of grid files should be used.
Some operations may require a large number of parameters. Also, some operations require that groups of parameters be repeatable as a group. In such cases, it is helpful to group related parameters in parameter descriptor groups. Each parameter group consists of a set of parameter descriptors, or other, nested parameter groups. This way of modeling is not mandatory; all parameters may be assigned directly to the operation method.
Service Metadata parameters
The metadata standard uses a simple parameter class (SV_Parameter
) with only name
,
direction
, description
, optionality
and repeatibility
properties.
However, in order to provide a unified parameter API, GeoAPI omits the metadata parameter class
and instead defines a mapping from metadata properties to GeoAPI properties.
The mapping is documented in OperationMetadata.getParameters()
and in GeneralParameterDescriptor
javadoc.
Data quality measure parameters
The data quality standard uses a simple parameter class (DQM_Parameter
) with only name
,
definition
, description
, valueType
, and valueStructure
properties.
However, in order to provide a unified parameter API, GeoAPI omits the data quality parameter class
and instead defines a mapping from data quality properties to GeoAPI properties.
The mapping is documented in Measure.getParameters()
and in GeneralParameterDescriptor
javadoc.
Filter and expression arguments
The filter encoding standard uses a simple argument class (Argument
)
with only name
and type
properties.
In order to provide a unified parameter API, GeoAPI omits the filter argument class
and instead defines a mapping from filter properties to GeoAPI properties.
The mapping is documented in AvailableFunction.getArguments()
and in GeneralParameterDescriptor
javadoc.
Web Processing Service parameters
The Web Processing Service (WPS) standard defines Input
and Output
structures
with some properties similar to the GeneralParameterDescriptor
ones.
In particular, Identifier
, Abstract
, MinOccurs
and MaxOccurs
have
direct equivalences to GeoAPI. While GeoAPI does not yet support WPS, we plan to retrofit WPS
input/output in existing API if possible.
- Since:
- 1.0
Departure from OGC/ISO standard for harmonization between different specifications
ISO 19111 defines parameters in the Coordinate Operation package, while ISO 19115 defines parameters in the Services package. GeoAPI moves those classes in thisparameter
independent package
and tries to provide a single model for the two standards when possible.
With this move, GeoAPI has extended the use of these parameter classes to a more general use rather
than only for referencing operation types.
-
ClassDescriptionAbstract definition of a parameter or group of parameters used by an operation method.Abstract parameter value or group of parameter values.Thrown if adding or removing a parameter value in a group would result in more or less parameters than the expected range.Thrown when an unexpected parameter was found in a parameter group.Thrown by
ParameterValue
getter methods when a value cannot be casted to the requested type.Thrown byParameterValue
setter methods when they are given an invalid value.The definition of a parameter used by an operation method.The definition of a group of related parameters used by an operation method.Class of information to which the referencing entity applies.Thrown by parameter groups (value and descriptor) when a parameter is requested but not found in that group.A single parameter value used by an operation method.A group of related parameter values.