|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.coverage.processing.Operations
Convenience, type-safe, methods for applying some common operations on
coverage objects. All methods wrap their arguments in a
parameter value group and delegate the work to the processor's
doOperation
method.
This convenience class do not brings any new functionalities, but brings type-safety when the
operation is know at compile time. For operation unknown at compile time (e.g. for an operation
selected by users in some widget), use the processor directly.
org.geotools.coverage.processing.operation
Field Summary | |
static Operations |
DEFAULT
The default instance. |
Constructor Summary | |
Operations(java.awt.RenderingHints hints)
Creates a new instance using the specified hints. |
Method Summary | |
org.opengis.coverage.Coverage |
absolute(org.opengis.coverage.Coverage source)
Computes the mathematical absolute value of each sample value. |
org.opengis.coverage.Coverage |
add(org.opengis.coverage.Coverage source,
double[] constants)
Adds constants (one for each band) to every sample values of the source coverage. |
org.opengis.coverage.Coverage |
divideBy(org.opengis.coverage.Coverage source,
double[] constants)
Divides every sample values of the source coverage by constants (one for each band). |
protected org.opengis.coverage.Coverage |
doOperation(java.lang.String operationName,
org.opengis.coverage.Coverage source)
Applies a process operation with default parameters. |
protected org.opengis.coverage.Coverage |
doOperation(java.lang.String operationName,
org.opengis.coverage.Coverage source,
java.lang.String argumentName1,
java.lang.Object argumentValue1)
Applies a process operation with one parameter. |
protected org.opengis.coverage.Coverage |
doOperation(java.lang.String operationName,
org.opengis.coverage.Coverage source,
java.lang.String argumentName1,
java.lang.Object argumentValue1,
java.lang.String argumentName2,
java.lang.Object argumentValue2)
Applies process operation with two parameters. |
protected org.opengis.coverage.Coverage |
doOperation(java.lang.String operationName,
org.opengis.coverage.Coverage source,
java.lang.String argumentName1,
java.lang.Object argumentValue1,
java.lang.String argumentName2,
java.lang.Object argumentValue2,
java.lang.String argumentName3,
java.lang.Object argumentValue3)
Applies a process operation with three parameters. |
org.opengis.coverage.Coverage |
exp(org.opengis.coverage.Coverage source)
Takes the exponential of the sample values of a coverage. |
org.opengis.coverage.Coverage |
gradientMagnitude(org.opengis.coverage.Coverage source)
Edge detector which computes the magnitude of the image gradient vector in two orthogonal directions. |
org.opengis.coverage.Coverage |
gradientMagnitude(org.opengis.coverage.Coverage source,
javax.media.jai.KernelJAI mask1,
javax.media.jai.KernelJAI mask2)
Edge detector which computes the magnitude of the image gradient vector in two orthogonal directions. |
org.opengis.coverage.grid.GridCoverage |
interpolate(org.opengis.coverage.grid.GridCoverage source,
javax.media.jai.Interpolation type)
Specifies the interpolation type to be used to interpolate values for points which fall between grid cells. |
org.opengis.coverage.grid.GridCoverage |
interpolate(org.opengis.coverage.grid.GridCoverage source,
javax.media.jai.Interpolation[] types)
Specifies the interpolation types to be used to interpolate values for points which fall between grid cells. |
org.opengis.coverage.grid.GridCoverage |
interpolate(org.opengis.coverage.grid.GridCoverage source,
java.lang.String type)
Specifies the interpolation type to be used to interpolate values for points which fall between grid cells. |
org.opengis.coverage.Coverage |
invert(org.opengis.coverage.Coverage source)
Inverts the sample values of a coverage. |
org.opengis.coverage.Coverage |
log(org.opengis.coverage.Coverage source)
Takes the natural logarithm of the sample values of a coverage. |
org.opengis.coverage.Coverage |
multiply(org.opengis.coverage.Coverage source,
double[] constants)
Multiplies every sample values of the source coverage by constants (one for each band). |
org.opengis.coverage.grid.GridCoverage |
nodataFilter(org.opengis.coverage.grid.GridCoverage source)
Replaces NaN values by the weighted average of neighbors values.
|
org.opengis.coverage.grid.GridCoverage |
nodataFilter(org.opengis.coverage.grid.GridCoverage source,
int padding,
int validityThreshold)
Replaces NaN values by the weighted average of neighbors values. |
org.opengis.coverage.Coverage |
resample(org.opengis.coverage.Coverage source,
org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Resamples a coverage to the specified coordinate reference system. |
org.opengis.coverage.Coverage |
resample(org.opengis.coverage.grid.GridCoverage source,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.coverage.grid.GridGeometry gridGeometry,
javax.media.jai.Interpolation interpolationType)
Resamples a grid coverage to the specified coordinate reference system and grid geometry. |
org.opengis.coverage.Coverage |
rescale(org.opengis.coverage.Coverage source,
double[] constants,
double[] offsets)
Maps the sample values of a coverage from one range to another range. |
org.opengis.coverage.Coverage |
selectSampleDimension(org.opengis.coverage.Coverage source,
int[] sampleDimensions)
Chooses N sample dimensions from a coverage and copies their sample data to the destination grid coverage in the order specified. |
org.opengis.coverage.Coverage |
subtract(org.opengis.coverage.Coverage source,
double[] constants)
Subtracts constants (one for each band) from every sample values of the source coverage. |
org.opengis.coverage.Coverage |
subtractFrom(org.opengis.coverage.Coverage source,
double[] constants)
Subtracts every sample values of the source coverage from constants (one for each band). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Operations DEFAULT
Constructor Detail |
public Operations(java.awt.RenderingHints hints)
hints
- The hints, or if none.Method Detail |
public org.opengis.coverage.Coverage add(org.opengis.coverage.Coverage source, double[] constants)
source
- The source coverage.constants
- The constants to add to each band.AddConst
public org.opengis.coverage.Coverage subtract(org.opengis.coverage.Coverage source, double[] constants)
source
- The source coverage.constants
- The constants to subtract to each band.SubtractConst
public org.opengis.coverage.Coverage subtractFrom(org.opengis.coverage.Coverage source, double[] constants)
source
- The source coverage.constants
- The constants to subtract from.SubtractFromConst
public org.opengis.coverage.Coverage multiply(org.opengis.coverage.Coverage source, double[] constants)
source
- The source coverage.constants
- The constants to multiply to each band.MultiplyConst
public org.opengis.coverage.Coverage divideBy(org.opengis.coverage.Coverage source, double[] constants)
source
- The source coverage.constants
- The constants to divides by.DivideByConst
public org.opengis.coverage.Coverage rescale(org.opengis.coverage.Coverage source, double[] constants, double[] offsets)
source
- The source coverage.constants
- The constants to multiply to each band.offsets
- The constants to add to each band.Rescale
public org.opengis.coverage.Coverage invert(org.opengis.coverage.Coverage source)
source
- The source coverage.Invert
public org.opengis.coverage.Coverage absolute(org.opengis.coverage.Coverage source)
source
- The source coverage.Absolute
public org.opengis.coverage.Coverage log(org.opengis.coverage.Coverage source)
source
- The source coverage.Log
public org.opengis.coverage.Coverage exp(org.opengis.coverage.Coverage source)
source
- The source coverage.Exp
public org.opengis.coverage.grid.GridCoverage interpolate(org.opengis.coverage.grid.GridCoverage source, java.lang.String type)
source
- The source coverage.type
- The interpolation type. Possible values are ,
and .Interpolate
public org.opengis.coverage.grid.GridCoverage interpolate(org.opengis.coverage.grid.GridCoverage source, javax.media.jai.Interpolation type)
source
- The source coverage.type
- The interpolation type as a JAI interpolation object.Interpolate
public org.opengis.coverage.grid.GridCoverage interpolate(org.opengis.coverage.grid.GridCoverage source, javax.media.jai.Interpolation[] types)
Interpolate
operation for details.
source
- The source coverage.types
- The interpolation types and their fallback.Interpolate
public org.opengis.coverage.Coverage resample(org.opengis.coverage.Coverage source, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
source
- The source coverage.crs
- The target coordinate reference system.Resample
public org.opengis.coverage.Coverage resample(org.opengis.coverage.grid.GridCoverage source, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.coverage.grid.GridGeometry gridGeometry, javax.media.jai.Interpolation interpolationType)
source
- The source coverage.crs
- The target coordinate reference system, or for keeping it unchanged.gridGeometry
- The grid geometry, or for a default one.interpolationType
- The interpolation type, or for the default one.Resample
public org.opengis.coverage.Coverage selectSampleDimension(org.opengis.coverage.Coverage source, int[] sampleDimensions)
source
- The source coverage.sampleDimensions
- The sample dimensions to select.SelectSampleDimension
public org.opengis.coverage.grid.GridCoverage nodataFilter(org.opengis.coverage.grid.GridCoverage source)
NaN
values by the weighted average of neighbors values.
This method uses the default padding and validity threshold.
source
- The source coverage.NodataFilter
public org.opengis.coverage.grid.GridCoverage nodataFilter(org.opengis.coverage.grid.GridCoverage source, int padding, int validityThreshold)
NaN
values by the weighted average of neighbors values.
source
- The source coverage.NodataFilter
public org.opengis.coverage.Coverage gradientMagnitude(org.opengis.coverage.Coverage source)
source
- The source coverage.GradientMagnitude
public org.opengis.coverage.Coverage gradientMagnitude(org.opengis.coverage.Coverage source, javax.media.jai.KernelJAI mask1, javax.media.jai.KernelJAI mask2)
source
- The source coverage.mask1
- The first mask.mask2
- The second mask, orthogonal to the first one.GradientMagnitude
protected final org.opengis.coverage.Coverage doOperation(java.lang.String operationName, org.opengis.coverage.Coverage source) throws org.opengis.coverage.processing.OperationNotFoundException
operationName
- Name of the operation to be applied to the coverage.source
- The source coverage.
org.opengis.coverage.processing.OperationNotFoundException
- if there is no operation named .protected final org.opengis.coverage.Coverage doOperation(java.lang.String operationName, org.opengis.coverage.Coverage source, java.lang.String argumentName1, java.lang.Object argumentValue1) throws org.opengis.coverage.processing.OperationNotFoundException, org.opengis.parameter.InvalidParameterNameException
operationName
- Name of the operation to be applied to the coverage.source
- The source coverage.argumentName1
- The name of the first parameter to set.argumentValue1
- The value for the first parameter.
org.opengis.coverage.processing.OperationNotFoundException
- if there is no operation named .
org.opengis.parameter.InvalidParameterNameException
- if there is no parameter with the specified name.protected final org.opengis.coverage.Coverage doOperation(java.lang.String operationName, org.opengis.coverage.Coverage source, java.lang.String argumentName1, java.lang.Object argumentValue1, java.lang.String argumentName2, java.lang.Object argumentValue2) throws org.opengis.coverage.processing.OperationNotFoundException, org.opengis.parameter.InvalidParameterNameException
operationName
- Name of the operation to be applied to the coverage.source
- The source coverage.argumentName1
- The name of the first parameter to set.argumentValue1
- The value for the first parameter.argumentName2
- The name of the second parameter to set.argumentValue2
- The value for the second parameter.
org.opengis.coverage.processing.OperationNotFoundException
- if there is no operation named .
org.opengis.parameter.InvalidParameterNameException
- if there is no parameter with the specified name.protected final org.opengis.coverage.Coverage doOperation(java.lang.String operationName, org.opengis.coverage.Coverage source, java.lang.String argumentName1, java.lang.Object argumentValue1, java.lang.String argumentName2, java.lang.Object argumentValue2, java.lang.String argumentName3, java.lang.Object argumentValue3) throws org.opengis.coverage.processing.OperationNotFoundException, org.opengis.parameter.InvalidParameterNameException
operationName
- Name of the operation to be applied to the coverage.source
- The source coverage.argumentName1
- The name of the first parameter to set.argumentValue1
- The value for the first parameter.argumentName2
- The name of the second parameter to set.argumentValue2
- The value for the second parameter.argumentName3
- The name of the third parameter to set.argumentValue3
- The value for the third parameter.
org.opengis.coverage.processing.OperationNotFoundException
- if there is no operation named .
org.opengis.parameter.InvalidParameterNameException
- if there is no parameter with the specified name.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |