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) in order to provide a unified framework for both 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.
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
ISO 19111 defines parameters in the Coordinate Operation package, while ISO 19115 defines parameters in the Services package. GeoAPI moves those classes in this
parameter
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.-
Interface Summary Interface Description GeneralParameterDescriptor Abstract definition of a parameter or group of parameters used by an operation method.GeneralParameterValue Abstract parameter value or group of parameter values.ParameterDescriptor<T> The definition of a parameter used by an operation method.ParameterDescriptorGroup The definition of a group of related parameters used by an operation method.ParameterValue<T> A single parameter value used by an operation method.ParameterValueGroup A group of related parameter values. -
Enum Summary Enum Description ParameterDirection Class of information to which the referencing entity applies. -
Exception Summary Exception Description InvalidParameterCardinalityException Thrown if adding or removing a parameter value in a group would result in more or less parameters than the expected range.InvalidParameterNameException Thrown when an unexpected parameter was found in a parameter group.InvalidParameterTypeException Thrown byParameterValue
getter methods when a value can not be casted to the requested type.InvalidParameterValueException Thrown byParameterValue
setter methods when they are given an invalid value.ParameterNotFoundException Thrown by parameter groups (value and descriptor) when a parameter is requested but not found in that group.