Skip navigation links

Package org.apache.sis.parameter

Descriptions and values of parameters used by a coordinate operation or a process.

See: Description

Package org.apache.sis.parameter Description

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:

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:

When using this org​.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 implementors, 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 create­Value() 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 implementor of a Mercator projection provides a Parameter­Descriptor­Group instance in a PARAMETERS static constant:
ParameterValueGroup group = Mercator.PARAMETERS.createValue();
group.parameter("Longitude of natural origin").setValue(-60);   // Using default units (e.g. degrees).
group.parameter("False easting").setValue(200.0, SI.KILOMETRE); // Using explicit units.
Calls to parameter(…) throw a Parameter­Not­Found­Exception if the given name is unknown to the group. Calls to set­Value(…) throw a Invalid­Parameter­Value­Exception if the given value is not assignable to the expected class or is not inside the value domain.

Defined in the sis-referencing module

Skip navigation links

Copyright © 2010–2016 The Apache Software Foundation. All rights reserved.