Package org.apache.sis.parameter
Class MatrixParametersAlphaNum
java.lang.Object
org.apache.sis.parameter.TensorParameters<Double>
org.apache.sis.parameter.MatrixParameters
org.apache.sis.parameter.MatrixParametersAlphaNum
- All Implemented Interfaces:
Serializable
A special case of
MatrixParameters
which create EPSG:9624 parameter names and identifiers.
The parameters created by this class are close, but not identical, to the EPSG:9624 definition of
"A0"
, "A1"
, "A2"
, "B0"
, "B1"
and "B2"
.
The differences are:
- EPSG:9624 is only for matrices of size 3×3 and consequently does not have
"num_row"
and"num_col"
parameters. This class extends the definition to matrices of arbitrary size and consequently accepts"num_row"
and"num_col"
as optional parameters. - EPSG:9624 is restricted to affine matrices and consequently define parameters only for the two
first rows. This class accepts also parameters for the last row (namely
"C0"
,"C1"
and"C2"
in a 3×3 matrices).
- Since:
- 0.6
- Version:
- 0.6
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.parameter.TensorParameters
ALPHANUM, CACHE_SIZE, prefix, separator, WKT1
-
Constructor Summary
ConstructorsConstructorDescriptionMatrixParametersAlphaNum
(org.opengis.parameter.ParameterDescriptor<Integer> numRow, org.opengis.parameter.ParameterDescriptor<Integer> numCol) Constructs a descriptors provider. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opengis.parameter.ParameterDescriptor<Double>
createElementDescriptor
(int[] indices) Creates a new parameter descriptor for a matrix element at the given indices.protected String
indicesToName
(int[] indices) Returns the parameter descriptor name of a matrix element at the given indices.(package private) Object
On deserialization, replaces the deserialized instance by the unique instance.Methods inherited from class org.apache.sis.parameter.MatrixParameters
aliasToIndices, indicesToAlias, isEPSG, nameToIndices
Methods inherited from class org.apache.sis.parameter.TensorParameters
createValueGroup, createValueGroup, descriptor, equals, getAllDescriptors, getDefaultValue, getDimensionDescriptor, getElementDescriptor, getElementType, hashCode, isInBounds, rank, toMatrix
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
MatrixParametersAlphaNum
MatrixParametersAlphaNum(org.opengis.parameter.ParameterDescriptor<Integer> numRow, org.opengis.parameter.ParameterDescriptor<Integer> numCol) Constructs a descriptors provider.- Parameters:
numRow
- the parameter for the number of rows.numCol
- the parameter for the number of columns.
-
-
Method Details
-
indicesToName
Returns the parameter descriptor name of a matrix element at the given indices. Overridden as a matter of principle, but not used directly by this implementation.- Overrides:
indicesToName
in classTensorParameters<Double>
- Parameters:
indices
- the indices of the tensor element for which to create a parameter name.- Returns:
- the parameter descriptor name for the tensor element at the given indices.
- Throws:
IllegalArgumentException
- if the given array does not have the expected length or have illegal value.
-
createElementDescriptor
protected org.opengis.parameter.ParameterDescriptor<Double> createElementDescriptor(int[] indices) throws IllegalArgumentException Creates a new parameter descriptor for a matrix element at the given indices. This method creates both the OGC name (e.g."elt_1_2"
) and the EPSG name (e.g."B2"
), together with the EPSG identifier (e.g."EPSG:8641"
) if it exists. SeeAffine
for a table summarizing the parameter names and identifiers.- Overrides:
createElementDescriptor
in classMatrixParameters
- Parameters:
indices
- the indices of the tensor element for which to create a parameter.- Returns:
- the parameter descriptor for the given tensor element.
- Throws:
IllegalArgumentException
- if the given array does not have the expected length or have illegal value.- See Also:
-
readResolve
On deserialization, replaces the deserialized instance by the unique instance.- Overrides:
readResolve
in classMatrixParameters
- Throws:
ObjectStreamException
-