| org.geotools.referencing.operation.DefaultOperationMethod org.geotools.referencing.operation.MathTransformProvider
MathTransformProvider | abstract public class MathTransformProvider extends DefaultOperationMethod (Code) | | An
capable to creates a
from set of
.
Implementations of this class should be listed in the following file:
META-INF/services/org.geotools.referencing.operation.MathTransformProvider
The
will parse this file in order
to gets all available providers on a system. If this file is bundle in many JAR files, the
will read all of them.
since: 2.0 version: $Id: MathTransformProvider.java 25262 2007-04-23 21:11:16Z desruisseaux $ author: Martin Desruisseaux |
Constructor Summary | |
public | MathTransformProvider(int sourceDimensions, int targetDimensions, ParameterDescriptorGroup parameters) Constructs a math transform provider from a set of parameters. | public | MathTransformProvider(Map properties, int sourceDimensions, int targetDimensions, ParameterDescriptorGroup parameters) Constructs a math transform provider from a set of properties.
The properties map is given unchanged to the
.
Parameters: properties - Set of properties. |
Method Summary | |
protected static ParameterDescriptor | createDescriptor(ReferenceIdentifier[] identifiers, double defaultValue, double minimum, double maximum, Unit unit) Constructs a parameter descriptor from a set of alias. | protected static ParameterDescriptorGroup | createDescriptorGroup(ReferenceIdentifier[] identifiers, GeneralParameterDescriptor[] parameters) Constructs a parameter group from a set of alias. | abstract protected MathTransform | createMathTransform(ParameterValueGroup values) Creates a math transform from the specified group of parameter values.
Subclasses can implements this method as in the example below:
double semiMajor = values.parameter("semi_major").doubleValue(SI.METER);
double semiMinor = values.parameter("semi_minor").doubleValue(SI.METER);
// etc...
return new MyTransform(semiMajor, semiMinor, ...);
Parameters: values - The group of parameter values. | protected static ParameterDescriptor | createOptionalDescriptor(ReferenceIdentifier[] identifiers, double minimum, double maximum, Unit unit) Constructs an optional parameter descriptor from a set of alias.
The parameter is identified as with
MathTransformProvider.createDescriptor .
Parameters: identifiers - The parameter identifiers. | protected static double | doubleValue(ParameterDescriptor param, ParameterValueGroup group) Returns the parameter value for the specified operation parameter.
Values are automatically converted into the standard units specified
by the supplied
param argument.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. | protected ParameterValueGroup | ensureValidValues(ParameterValueGroup values) Ensures that the given set of parameters contains only valid values.
This method compares all parameter names against the names declared in the
. | protected String | formatWKT(Formatter formatter) Format the inner part of a
Well
Known Text (WKT) element.
Parameters: formatter - The formatter to use. | public Class | getOperationType() Returns the operation type. | protected static int | intValue(ParameterDescriptor param, ParameterValueGroup group) Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. | protected static String | stringValue(ParameterDescriptor param, ParameterValueGroup group) Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. | protected static Object | value(ParameterDescriptor param, ParameterValueGroup group) Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. |
MathTransformProvider | public MathTransformProvider(int sourceDimensions, int targetDimensions, ParameterDescriptorGroup parameters)(Code) | | Constructs a math transform provider from a set of parameters. The provider
will be the same than the parameter
ones.
Parameters: sourceDimensions - Number of dimensions in the source CRS of this operation method. Parameters: targetDimensions - Number of dimensions in the target CRS of this operation method. Parameters: parameters - The set of parameters (never null ). |
MathTransformProvider | public MathTransformProvider(Map properties, int sourceDimensions, int targetDimensions, ParameterDescriptorGroup parameters)(Code) | | Constructs a math transform provider from a set of properties.
The properties map is given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: sourceDimensions - Number of dimensions in the source CRS of this operation method. Parameters: targetDimensions - Number of dimensions in the target CRS of this operation method. Parameters: parameters - The set of parameters (never null ). |
createDescriptor | protected static ParameterDescriptor createDescriptor(ReferenceIdentifier[] identifiers, double defaultValue, double minimum, double maximum, Unit unit)(Code) | | Constructs a parameter descriptor from a set of alias. The parameter is
identified by codes provided by one or more authorities. Common authorities are
Citations.OGC OGC and
Citations.EPSG EPSG for example.
The first entry in the
identifiers array is both the
and the
.
All others are
.
Parameters: identifiers - The parameter identifiers. Most contains at least one entry. Parameters: defaultValue - The default value for the parameter, or Double.NaN if none. Parameters: minimum - The minimum parameter value, or Double.NEGATIVE_INFINITY if none. Parameters: maximum - The maximum parameter value, or Double.POSITIVE_INFINITY if none. Parameters: unit - The unit for default, minimum and maximum values. |
createDescriptorGroup | protected static ParameterDescriptorGroup createDescriptorGroup(ReferenceIdentifier[] identifiers, GeneralParameterDescriptor[] parameters)(Code) | | Constructs a parameter group from a set of alias. The parameter group is
identified by codes provided by one or more authorities. Common authorities are
Citations.OGC OGC and
Citations.EPSG EPSG for example.
Special rules:
- The first entry in the
identifiers array is the
.
- If a an entry do not implements the
GenericName interface, it is
an
.
- All others are
.
Parameters: identifiers - The operation identifiers. Most contains at least one entry. Parameters: parameters - The set of parameters, or null or an empty array if none. |
createMathTransform | abstract protected MathTransform createMathTransform(ParameterValueGroup values) throws InvalidParameterNameException, ParameterNotFoundException, InvalidParameterValueException, FactoryException(Code) | | Creates a math transform from the specified group of parameter values.
Subclasses can implements this method as in the example below:
double semiMajor = values.parameter("semi_major").doubleValue(SI.METER);
double semiMinor = values.parameter("semi_minor").doubleValue(SI.METER);
// etc...
return new MyTransform(semiMajor, semiMinor, ...);
Parameters: values - The group of parameter values. The created math transform. throws: InvalidParameterNameException - if the values contains an unknow parameter. throws: ParameterNotFoundException - if a required parameter was not found. throws: InvalidParameterValueException - if a parameter has an invalid value. throws: FactoryException - if the math transform can't be created for some other reason(for example a required file was not found). See Also: MathTransformProvider.Delegate |
createOptionalDescriptor | protected static ParameterDescriptor createOptionalDescriptor(ReferenceIdentifier[] identifiers, double minimum, double maximum, Unit unit)(Code) | | Constructs an optional parameter descriptor from a set of alias.
The parameter is identified as with
MathTransformProvider.createDescriptor .
Parameters: identifiers - The parameter identifiers. Most contains at least one entry. Parameters: minimum - The minimum parameter value, or Double.NEGATIVE_INFINITY if none. Parameters: maximum - The maximum parameter value, or Double.POSITIVE_INFINITY if none. Parameters: unit - The unit for default, minimum and maximum values. |
doubleValue | protected static double doubleValue(ParameterDescriptor param, ParameterValueGroup group) throws ParameterNotFoundException(Code) | | Returns the parameter value for the specified operation parameter.
Values are automatically converted into the standard units specified
by the supplied
param argument.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. The requested parameter value, or NaN if param is and the user didn'tprovided any value. throws: ParameterNotFoundException - if the parameter is not found.org.geotools.parameter.Parameters |
ensureValidValues | protected ParameterValueGroup ensureValidValues(ParameterValueGroup values) throws InvalidParameterNameException, InvalidParameterValueException(Code) | | Ensures that the given set of parameters contains only valid values.
This method compares all parameter names against the names declared in the
. If an unknow
parameter name is found, then an
InvalidParameterNameException is thrown.
This method also ensures that all values are assignable to the
, are between the
and
values and are one of the
.
If the value fails any of those tests, then an
InvalidParameterValueException is thrown.
Parameters: values - The parameters values to check. The parameter values to use for construction. May be different than the supplied values argument if some missing values needed to be filled with default values. throws: InvalidParameterNameException - if a parameter name is unknow. throws: InvalidParameterValueException - if a parameter has an invalid value. |
getOperationType | public Class getOperationType()(Code) | | Returns the operation type. It may be
.class ,
.class ,
.class ,
etc.
The default implementation returns
Operation.class .
Subclass should overrides this methods and returns the appropriate
OpenGIS interface type (not the implementation type).
|
intValue | protected static int intValue(ParameterDescriptor param, ParameterValueGroup group) throws ParameterNotFoundException(Code) | | Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. The requested parameter value, or 0 if param is and the user didn'tprovided any value. throws: ParameterNotFoundException - if the parameter is not found.org.geotools.parameter.Parameters |
stringValue | protected static String stringValue(ParameterDescriptor param, ParameterValueGroup group) throws ParameterNotFoundException(Code) | | Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. The requested parameter value, or null if param is and the user didn'tprovided any value. throws: ParameterNotFoundException - if the parameter is not found.org.geotools.parameter.Parameters |
value | protected static Object value(ParameterDescriptor param, ParameterValueGroup group) throws ParameterNotFoundException(Code) | | Returns the parameter value for the specified operation parameter.
This convenience method is used by subclasses for initializing
from a set of parameters.
Parameters: param - The parameter to look for. Parameters: group - The parameter value group to search into. The requested parameter value, or null if param is and the user didn'tprovided any value. throws: ParameterNotFoundException - if the parameter is not found.org.geotools.parameter.Parameters |
Fields inherited from org.geotools.referencing.operation.DefaultOperationMethod | final protected int sourceDimensions(Code)(Java Doc) final protected int targetDimensions(Code)(Java Doc)
|
|
|