Package org.apache.sis.parameter
package org.apache.sis.parameter
Descriptions and values of parameters used by a coordinate operation or a process.
An explanation for this package is provided in the OpenGIS® javadoc.
The remaining discussion on this page is specific to the SIS implementation.
There is three categories of classes in this package:
- 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 (descriptor, value) tuples, together with convenience methods for performing unit conversions and getting the values as instances of some commonly used types.
- Builders, formatters and search methods aim to simplify the creation of
ParameterDescriptor
s, the search for parameter values and visualizing them in a tabular format.
Parameters are organized in groups.
A group may be for example the set of all parameters needed for the definition of a Mercator projection.
Parameter groups have some similarities with java.util.Map
where:
- Keys are (indirectly) parameter names.
- Values are (indirectly) typically of type
int
,int[]
,double
,double[]
,boolean
,String
,URI
orCitation
. - Each parameter (equivalent to map entry) constraints the values to a base value class, and optionally to a value domain (i.e. minimum and maximum valid values) or an enumeration of valid values.
- Each parameter can have a default value and a unit of measurement.
- Some parameters are mandatory (minimum occurrence = 1), meaning that they cannot be removed from the group. They can be left to their default value however.
- Group may contain other groups.
Usage
When using thisorg.apache.sis.parameter
package, the starting point is usually to obtain a
parameter group descriptor for
the operation of interest. Those groups are provided by the operation implementers, so users do not
need to create their own.
Given a group descriptor, users can obtain a new instance of parameter values by a call to the
createValue()
method.
New value groups initially contain all mandatory parameters with their default values and no optional parameter.
A parameter(String)
convenience
method is provided for fetching a parameter regardless of whether it was present or not — optional parameters
are created when first needed.
Example: the following code snippet assumes that the implementer of a Mercator projection
provides a
Calls to ParameterDescriptorGroup
instance in a PARAMETERS
static constant:
parameter(…)
throw a ParameterNotFoundException
if the given name is unknown to the group.
Calls to setValue(…)
throw a InvalidParameterValueException
if the given value is not assignable to the expected class or is not inside the value domain.- Since:
- 0.4
- Version:
- 1.3
-
ClassDescriptionAbstract definition of a parameter or group of parameters used by a coordinate operation or a process.The definition of a single parameter used by an operation method.The definition of a group of related parameters used by an operation method.The
DefaultParameterDescriptorGroup.descriptors
as an unmodifiable list.A single parameter value used by an operation method.A group of related parameter values.Wraps the given group of parameters, but hiding some parameters.XML representation of a sequence of integer values.Map projection parameters, with special processing for alternative ways to express the ellipsoid axis length and the standard parallels.Map projection parameters, with special processing for alternative ways to express the ellipsoid axis length and the standard parallels.The earth radius parameter.The inverse flattening parameter.Whether the inverse flattening parameter is definitive.The standard parallels parameter as an array ofdouble
.A special case ofTensorParameters
restricted to the two-dimensional case.A special case ofMatrixParameters
which create EPSG:9624 parameter names and identifiers.Helper class for parameter descriptor instantiations.Formats parameter descriptors or parameter values in a tabular format.The amount of information to include in the table formatted byParameterFormat
.An object which can supply its parameters in aParameterValueGroup
.Convenience methods for fetching parameter values despite the variations in parameter names, value types and units.Wrappers used as a fallback byParameters.castOrWrap(ParameterValueGroup)
.A row in the table to be formatted byParameterFormat
.The list to be returned byDefaultParameterValueGroup.values()
.Creates parameter groups for tensors (usually matrices).TensorValues<E>The values for a group of tensor parameters.Placeholder for a mandatory parameter value which has not yet been initialized.A parameter value which cannot be modified.A parameter value group which cannot be modified.Verifies the validity of a given value.