|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.referencing.wkt.Formattable
org.geotools.referencing.AbstractIdentifiedObject
org.geotools.parameter.AbstractParameterDescriptor
org.geotools.parameter.DefaultParameterDescriptorGroup
org.geotools.parameter.MatrixParameterDescriptors
public class MatrixParameterDescriptors
A parameter group for matrix elements. The amount of
parameter values is extensible, i.e. it can grown or
shrink according the value of "num_row"
and "num_col"
parameters. The parameters format may vary according the information provided to
the constructor, but it is typically as below:
num_row num_col elt_0_0 elt_0_1 ... elt_0_<num_col-1> elt_1_0 elt_1_1 ... elt_<num_row-1>_<num_col-1>
MatrixParameters
,
Serialized FormField Summary | |
---|---|
static int |
DEFAULT_MATRIX_SIZE
The default matrix size for the one-argument constructor. |
protected org.opengis.parameter.ParameterDescriptor<java.lang.Integer> |
numCol
The descriptor for the "num_col" parameter. |
protected org.opengis.parameter.ParameterDescriptor<java.lang.Integer> |
numRow
The descriptor for the "num_row" parameter. |
protected java.lang.String |
prefix
The prefix to insert in front of parameter name for each matrix elements. |
protected char |
separator
The separator between the row and the column index in parameter names. |
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject |
---|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR |
Fields inherited from class org.geotools.referencing.wkt.Formattable |
---|
SINGLE_LINE |
Fields inherited from interface org.opengis.referencing.IdentifiedObject |
---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
Constructor Summary | |
---|---|
MatrixParameterDescriptors(java.util.Map<java.lang.String,?> properties)
Constructs a parameter group with default name format matching Well Known Text usages. |
|
MatrixParameterDescriptors(java.util.Map<java.lang.String,?> properties,
org.opengis.parameter.ParameterDescriptor<?>[] parameters,
java.lang.String prefix,
char separator)
Constructs a parameter group. |
Method Summary | |
---|---|
org.opengis.parameter.ParameterValueGroup |
createValue()
Creates a new instance of parameter values with elements initialized to the 1 on the diagonal, and 0 everywere else. |
org.opengis.parameter.ParameterDescriptor<java.lang.Double> |
descriptor(int row,
int column)
Returns the parameter in this group for a matrix element at the specified index. |
org.opengis.parameter.GeneralParameterDescriptor |
descriptor(java.lang.String name)
Returns the parameter in this group for the specified name. |
java.util.List<org.opengis.parameter.GeneralParameterDescriptor> |
descriptors()
Returns the parameters in this group. |
boolean |
equals(AbstractIdentifiedObject object,
boolean compareMetadata)
Compares the specified object with this parameter group for equality. |
org.opengis.referencing.operation.Matrix |
getMatrix(org.opengis.parameter.ParameterValueGroup parameters)
Constructs a matrix from a group of parameters. |
int |
hashCode()
Returns a hash value for this parameter. |
Methods inherited from class org.geotools.parameter.DefaultParameterDescriptorGroup |
---|
getMaximumOccurs |
Methods inherited from class org.geotools.parameter.AbstractParameterDescriptor |
---|
formatWKT, getMinimumOccurs |
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject |
---|
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches |
Methods inherited from class org.geotools.referencing.wkt.Formattable |
---|
cleanupThreadLocals, toString, toWKT, toWKT, toWKT |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.parameter.GeneralParameterDescriptor |
---|
getMinimumOccurs |
Methods inherited from interface org.opengis.referencing.IdentifiedObject |
---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
Field Detail |
---|
public static final int DEFAULT_MATRIX_SIZE
protected final org.opengis.parameter.ParameterDescriptor<java.lang.Integer> numRow
"num_row"
parameter.
protected final org.opengis.parameter.ParameterDescriptor<java.lang.Integer> numCol
"num_col"
parameter.
protected final java.lang.String prefix
protected final char separator
Constructor Detail |
---|
public MatrixParameterDescriptors(java.util.Map<java.lang.String,?> properties)
properties
- Set of properties. Should contains at least "name"
.public MatrixParameterDescriptors(java.util.Map<java.lang.String,?> properties, org.opengis.parameter.ParameterDescriptor<?>[] parameters, java.lang.String prefix, char separator)
parameters
array should contains parameters other
than matrix elements. The first parameter is assumed to be the number of rows, and
the second parameter the number of columns. All extra parameters are ignored.
properties
- Set of properties. Should contains at least "name"
.parameters
- The "num_row"
and "num_col"
parameters.prefix
- The prefix to insert in front of parameter name for each matrix elements.separator
- The separator between the row and the column index in parameter names.Method Detail |
---|
public final org.opengis.parameter.GeneralParameterDescriptor descriptor(java.lang.String name) throws org.opengis.parameter.ParameterNotFoundException
"elt_row_col"
where
"elt_"
is the prefix for all matrix elements, and row
and col are row and column indices respectively. For example "elt_2_1"
is the element name for the value at line 2 and row 1. The row and column index are 0 based.
descriptor
in interface org.opengis.parameter.ParameterDescriptorGroup
descriptor
in class DefaultParameterDescriptorGroup
name
- The case insensitive name of the parameter to search for.
org.opengis.parameter.ParameterNotFoundException
- if there is no parameter for the given name.public final org.opengis.parameter.ParameterDescriptor<java.lang.Double> descriptor(int row, int column) throws java.lang.IndexOutOfBoundsException
numRow
and numCol
parameters.
row
- The row indice.column
- The column indice
java.lang.IndexOutOfBoundsException
- if row
or column
is out of bounds.public final java.util.List<org.opengis.parameter.GeneralParameterDescriptor> descriptors()
numRow
and numCol
parameters.
descriptors
in interface org.opengis.parameter.ParameterDescriptorGroup
descriptors
in class DefaultParameterDescriptorGroup
public org.opengis.parameter.ParameterValueGroup createValue()
numRow
and numCol
parameters.
createValue
in interface org.opengis.parameter.GeneralParameterDescriptor
createValue
in interface org.opengis.parameter.ParameterDescriptorGroup
createValue
in class DefaultParameterDescriptorGroup
public org.opengis.referencing.operation.Matrix getMatrix(org.opengis.parameter.ParameterValueGroup parameters) throws org.opengis.parameter.InvalidParameterNameException
parameters
- The group of parameters.
org.opengis.parameter.InvalidParameterNameException
- if a parameter name was not recognized.public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
equals
in class DefaultParameterDescriptorGroup
object
- The object to compare to this
.compareMetadata
- true
for performing a strict comparaison, or
false
for comparing only properties relevant to transformations.
true
if both objects are equal.public int hashCode()
hashCode
in class DefaultParameterDescriptorGroup
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |