| java.lang.Object org.geotools.referencing.operation.transform.DimensionFilter
DimensionFilter | public class DimensionFilter (Code) | | An utility class for the separation of
of
. Given an arbitrary
, this utility class will returns a new math transform
that operates only of a given set of source dimensions. For example if the supplied
transform has (x, y, z) inputs and
(longitude, latitude, height) outputs, then
the following code:
(0, 2);
MathTransform mt =
(transform);
will returns a transform with (x, y) inputs and (probably)
(longitude, latitude) outputs. The later can be verified with
a call to
DimensionFilter.getTargetDimensions .
since: 2.1 version: $Id: DimensionFilter.java 29058 2008-02-03 17:47:07Z desruisseaux $ author: Martin Desruisseauxorg.opengis.referencing.operation.CoordinateOperation org.geotools.util.SortedIntegerSet |
Constructor Summary | |
public | DimensionFilter() Constructs a dimension filter with the
. | public | DimensionFilter(Hints hints) Constructs a dimension filter with a
. | public | DimensionFilter(MathTransformFactory factory) Constructs a dimension filter with the specified factory. |
DimensionFilter | public DimensionFilter()(Code) | | Constructs a dimension filter with the
.
|
DimensionFilter | public DimensionFilter(Hints hints)(Code) | | Constructs a dimension filter with a
.
Parameters: hints - Hints to control the creation of the MathTransformFactory. |
DimensionFilter | public DimensionFilter(MathTransformFactory factory)(Code) | | Constructs a dimension filter with the specified factory.
Parameters: factory - The factory for the creation of new math transforms. |
addSourceDimension | public void addSourceDimension(int dimension) throws IllegalArgumentException(Code) | | Add an input dimension to keep. The
dimension applies to the
source dimensions of the transform to be given to
(transform) .
The number must be in the range 0 inclusive to
transform.
exclusive.
Parameters: dimension - The dimension to add. throws: IllegalArgumentException - if dimension is negative. |
addSourceDimensionRange | public void addSourceDimensionRange(int lower, int upper) throws IllegalArgumentException(Code) | | Add a range of input dimensions to keep. The
lower and
upper values
apply to the source dimensions of the transform to be given to
(transform) .
Parameters: lower - The lower dimension, inclusive. Must not be smaller than 0. Parameters: upper - The upper dimension, exclusive. Must not be greater thantransform. . |
addSourceDimensions | public void addSourceDimensions(int[] dimensions) throws IllegalArgumentException(Code) | | Add input dimensions to keep. The
dimensions apply to the
source dimensions of the transform to be given to
(transform) .
All numbers must be in the range 0 inclusive to
transform.
exclusive. The
dimensions values must be in strictly increasing order.
Parameters: dimensions - The new sequence of dimensions. throws: IllegalArgumentException - if dimensions contains negative values oris not a strictly increasing sequence. |
addTargetDimension | public void addTargetDimension(int dimension) throws IllegalArgumentException(Code) | | Add an output dimension to keep. The
dimension applies to the
target dimensions of the transform to be given to
(transform) .
The number must be in the range 0 inclusive to
transform.
exclusive.
Parameters: dimension - The dimension to add. throws: IllegalArgumentException - if dimension is negative. |
addTargetDimensionRange | public void addTargetDimensionRange(int lower, int upper) throws IllegalArgumentException(Code) | | Add a range of output dimensions to keep. The
lower and
upper values
apply to the target dimensions of the transform to be given to
(transform) .
Parameters: lower - The lower dimension, inclusive. Must not be smaller than 0. Parameters: upper - The upper dimension, exclusive. Must not be greater thantransform. . |
addTargetDimensions | public void addTargetDimensions(int[] dimensions) throws IllegalArgumentException(Code) | | Add output dimensions to keep. The
dimensions apply to the
target dimensions of the transform to be given to
(transform) .
All numbers must be in the range 0 inclusive to
transform.
exclusive. The
dimensions values must be in strictly increasing order.
Parameters: dimensions - The new sequence of dimensions. throws: IllegalArgumentException - if dimensions contains negative values oris not a strictly increasing sequence. |
clear | public void clear()(Code) | | Clear any
and
setting.
|
getSourceDimensions | public int[] getSourceDimensions() throws IllegalStateException(Code) | | Returns the input dimensions. This information is available only if at least one
setter method has been explicitly invoked for source dimensions.
The input dimension as a sequence of strictly increasing values. throws: IllegalStateException - if input dimensions have not been set. |
getTargetDimensions | public int[] getTargetDimensions() throws IllegalStateException(Code) | | Returns the output dimensions. This information is available only if one of the following
conditions is meet:
- Target dimensions has been explicitly set using setter methods.
- No target dimensions were set but
(transform)
has been invoked at least once, in which case the target dimensions are inferred
automatically from the
and the
transform .
The output dimension as a sequence of strictly increasing values. throws: IllegalStateException - if this information is not available. |
separate | public MathTransform separate(MathTransform transform) throws FactoryException(Code) | | Separates the specified math transform. This method returns a math transform that uses
only the specified
and returns only
the specified
. Special case:
If
are unspecified, then the
returned transform will expects all source dimensions as input but will produces only
the specified
as output.
If
are unspecified, then the
returned transform will expects only the specified
as input, and the target dimensions will be inferred
automatically.
Parameters: transform - The transform to separate. The separated math transform. throws: FactoryException - if the transform can't be separated. |
|
|