| java.lang.Object org.geotools.coverage.processing.Operations
Operations | public class Operations (Code) | | Convenience, type-safe, methods for applying some common operations on
objects. All methods wrap their arguments in a
and delegate the work to the processor's
AbstractProcessor.doOperation 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
directly.
since: 2.2 version: $Id: Operations.java 26601 2007-08-19 23:16:35Z desruisseaux $ author: Martin Desruisseaux See Also: org.geotools.coverage.processing.operation |
Method Summary | |
public GridCoverage | SubsampleAverage(GridCoverage source, double scaleX, double scaleY, Interpolation interpolation, BorderExtender be) | public Coverage | absolute(Coverage source) Computes the mathematical absolute value of each sample value. | public Coverage | add(Coverage source, double[] constants) Adds constants (one for each band) to every sample values of the source coverage. | public Coverage | crop(Coverage Source, Envelope envelope) Crops the image to a specified rectangular area. | public Coverage | divideBy(Coverage source, double[] constants) Divides every sample values of the source coverage by constants (one for each band). | final protected Coverage | doOperation(String operationName, Coverage source) Applies a process operation with default parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1) Applies a process operation with one parameter.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2) Applies process operation with two parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. Parameters: argumentName2 - The name of the second parameter to setParameterValue. Parameters: argumentValue2 - The value for the second parameter. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3) Applies a process operation with three parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. Parameters: argumentName2 - The name of the second parameter to setParameterValue. Parameters: argumentValue2 - The value for the second parameter. Parameters: argumentName3 - The name of the third parameter to setParameterValue. Parameters: argumentValue3 - The value for the third parameter. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4) Applies a process operation with four parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4, String argumentName5, Object argumentValue5) Applies a process operation with five parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. | final protected Coverage | doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4, String argumentName5, Object argumentValue5, String argumentName6, Object argumentValue6) Applies a process operation with six parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. | public Coverage | exp(Coverage source) Takes the exponential of the sample values of a coverage. | public GridCoverage | filteredSubsample(GridCoverage source) Subsamples an image using the default values. | public GridCoverage | filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter) Subsamples an image by integral factors.
Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. | public GridCoverage | filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter, Interpolation interpolation) Subsamples an image by integral factors.
Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. | public GridCoverage | filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter, Interpolation interpolation, BorderExtender be) Subsamples an image by integral factors.
Operations.Operations(Hints) Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. | public Coverage | gradientMagnitude(Coverage source) Edge detector which computes the magnitude of the image gradient vector in two orthogonal
directions. | public Coverage | gradientMagnitude(Coverage source, KernelJAI mask1, KernelJAI mask2) Edge detector which computes the magnitude of the image gradient vector in two orthogonal
directions. | public GridCoverage | interpolate(GridCoverage source, String type) Specifies the interpolation type to be used to interpolate values for points which fall
between grid cells. | public GridCoverage | interpolate(GridCoverage source, Interpolation type) Specifies the interpolation type to be used to interpolate values for points which fall
between grid cells. | public GridCoverage | interpolate(GridCoverage source, Interpolation[] types) Specifies the interpolation types to be used to interpolate values for points which fall
between grid cells. | public Coverage | invert(Coverage source) Inverts the sample values of a coverage. | public Coverage | log(Coverage source) Takes the natural logarithm of the sample values of a coverage. | public Coverage | multiply(Coverage source, double[] constants) Multiplies every sample values of the source coverage by constants (one for each band). | public GridCoverage | nodataFilter(GridCoverage source) Replaces
Float.NaN NaN values by the weighted average of neighbors values. | public GridCoverage | nodataFilter(GridCoverage source, int padding, int validityThreshold) Replaces
Float.NaN NaN values by the weighted average of neighbors values.
Parameters: source - The source coverage. Parameters: padding - The number of pixels above, below, to the left and to the right of central NaN pixel to use for computing the average. | public GridCoverage | recolor(GridCoverage source, Map[] colorMaps) Recolors a coverage to the specified colormaps. | public GridCoverage | recolor(GridCoverage source, ColorMap[] colorMaps) Recolors a coverage to the specified color maps. | public Coverage | resample(Coverage source, CoordinateReferenceSystem crs) Resamples a coverage to the specified coordinate reference system. | public Coverage | resample(GridCoverage source, CoordinateReferenceSystem crs, GridGeometry gridGeometry, Interpolation interpolationType) Resamples a grid coverage to the specified coordinate reference system and grid geometry. | public Coverage | rescale(Coverage source, double[] constants, double[] offsets) Maps the sample values of a coverage from one range to another range. | public GridCoverage | scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans) Translates and resizes an image. | public GridCoverage | scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans, Interpolation interpolation) Translates and resizes an image. | public GridCoverage | scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans, Interpolation interpolation, BorderExtender extender) Translates and resizes an image. | public Coverage | selectSampleDimension(Coverage source, int[] sampleDimensions) Chooses N
from a coverage and copies their sample data to the destination grid coverage in the order
specified. | public GridCoverage | subsampleAverage(GridCoverage source, double scaleX, double scaleY, Interpolation interpolation, BorderExtender be) | public Coverage | subtract(Coverage source, double[] constants) Subtracts constants (one for each band) from every sample values of the source coverage. | public Coverage | subtractFrom(Coverage source, double[] constants) Subtracts every sample values of the source coverage from constants (one for each band). |
Operations | public Operations(RenderingHints hints)(Code) | | Creates a new instance using the specified hints.
Parameters: hints - The hints, or null if none. |
doOperation | final protected Coverage doOperation(String operationName, Coverage source) throws OperationNotFoundException, CoverageProcessingException(Code) | | Applies a process operation with default parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: CoverageProcessingException - if the operation can't be applied. |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies a process operation with one parameter.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies process operation with two parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. Parameters: argumentName2 - The name of the second parameter to setParameterValue. Parameters: argumentValue2 - The value for the second parameter. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies a process operation with three parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. Parameters: argumentName1 - The name of the first parameter to setParameterValue. Parameters: argumentValue1 - The value for the first parameter. Parameters: argumentName2 - The name of the second parameter to setParameterValue. Parameters: argumentValue2 - The value for the second parameter. Parameters: argumentName3 - The name of the third parameter to setParameterValue. Parameters: argumentValue3 - The value for the third parameter. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies a process operation with four parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. since: 2.3 |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4, String argumentName5, Object argumentValue5) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies a process operation with five parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. since: 2.3 |
doOperation | final protected Coverage doOperation(String operationName, Coverage source, String argumentName1, Object argumentValue1, String argumentName2, Object argumentValue2, String argumentName3, Object argumentValue3, String argumentName4, Object argumentValue4, String argumentName5, Object argumentValue5, String argumentName6, Object argumentValue6) throws OperationNotFoundException, InvalidParameterNameException, CoverageProcessingException(Code) | | Applies a process operation with six parameters.
This is a helper method for implementation of various convenience methods in this class.
Parameters: operationName - Name of the operation to be applied to the coverage. Parameters: source - The source coverage. The result as a coverage. throws: OperationNotFoundException - if there is no operation named operationName . throws: InvalidParameterNameException - if there is no parameter with the specified name. throws: CoverageProcessingException - if the operation can't be applied. since: 2.3 |
filteredSubsample | public GridCoverage filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter) throws CoverageProcessingException(Code) | | Subsamples an image by integral factors.
Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. The default value is 2. Parameters: scaleY - The scale factor along the y axis. The default value is 2. Parameters: qsFilter - The filter. Default to a quadrant symmetric filter generated froma Gaussian kernel throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.FilteredSubsample since: 2.3 |
filteredSubsample | public GridCoverage filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter, Interpolation interpolation) throws CoverageProcessingException(Code) | | Subsamples an image by integral factors.
Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. The default value is 2. Parameters: scaleY - The scale factor along the y axis. The default value is 2. Parameters: qsFilter - The filter. Default to a quadrant symmetric filter generated froma Gaussian kernel Parameters: interpolation - The interpolation to use, or null for the default. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.FilteredSubsample since: 2.3 #filteredSubsample(GridCoverage,int,int,float[],
* Interpolation,BorderExtender} null |
filteredSubsample | public GridCoverage filteredSubsample(GridCoverage source, int scaleX, int scaleY, float[] qsFilter, Interpolation interpolation, BorderExtender be) throws CoverageProcessingException(Code) | | Subsamples an image by integral factors.
Operations.Operations(Hints) Parameters: source - The source coverage. Parameters: scaleX - The scale factor along the x axis. The default value is 2. Parameters: scaleY - The scale factor along the y axis. The default value is 2. Parameters: qsFilter - The filter. Default to a quadrant symmetric filter generated from aGaussian kernel Parameters: interpolation - The interpolation to use, or null for the default. Parameters: be - The border extender, or null for the default. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.FilteredSubsample since: 2.3 |
interpolate | public GridCoverage interpolate(GridCoverage source, String type) throws CoverageProcessingException(Code) | | Specifies the interpolation type to be used to interpolate values for points which fall
between grid cells. The default value is nearest neighbor. The new interpolation type
operates on all sample dimensions.
Parameters: source - The source coverage. Parameters: type - The interpolation type. Possible values are "NearestNeighbor" , "Bilinear" and "Bicubic" . throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Interpolate |
interpolate | public GridCoverage interpolate(GridCoverage source, Interpolation type) throws CoverageProcessingException(Code) | | Specifies the interpolation type to be used to interpolate values for points which fall
between grid cells. The default value is nearest neighbor. The new interpolation type
operates on all sample dimensions.
Parameters: source - The source coverage. Parameters: type - The interpolation type as a JAI interpolation object. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Interpolate |
nodataFilter | public GridCoverage nodataFilter(GridCoverage source, int padding, int validityThreshold) throws CoverageProcessingException(Code) | | Replaces
Float.NaN NaN values by the weighted average of neighbors values.
Parameters: source - The source coverage. Parameters: padding - The number of pixels above, below, to the left and to the right of central NaN pixel to use for computing the average. The default value is 1. Parameters: validityThreshold - The minimal number of valid values required for computing theaverage. The NaN value will be replaced by the average only if the numberof valid value is greater than or equals to this threshold. The default value is 4. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.NodataFilter |
resample | public Coverage resample(GridCoverage source, CoordinateReferenceSystem crs, GridGeometry gridGeometry, Interpolation interpolationType) throws CoverageProcessingException(Code) | | Resamples a grid coverage to the specified coordinate reference system and grid geometry.
Parameters: source - The source coverage. Parameters: crs - The target coordinate reference system, or null for keeping it unchanged. Parameters: gridGeometry - The grid geometry, or null for a default one. Parameters: interpolationType - The interpolation type, or null for the default one. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Resample |
scale | public GridCoverage scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans) throws CoverageProcessingException(Code) | | Translates and resizes an image.
Parameters: source - The source coverage. Parameters: xScale - The scale factor along the x axis. Parameters: yScale - The scale factor along the y axis. Parameters: xTrans - The translation along the x axis. Parameters: yTrans - The translation along the x axis. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Scale since: 2.3 |
scale | public GridCoverage scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans, Interpolation interpolation) throws CoverageProcessingException(Code) | | Translates and resizes an image.
Parameters: source - The source coverage. Parameters: xScale - The scale factor along the x axis. Parameters: yScale - The scale factor along the y axis. Parameters: xTrans - The translation along the x axis. Parameters: yTrans - The translation along the x axis. Parameters: interpolation - The interpolation to use, or null for the default. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Scale #scale(GridCoverage,double,double,double,double,
* Interpolation,BorderExtender} null since: 2.3 |
scale | public GridCoverage scale(GridCoverage source, double xScale, double yScale, double xTrans, double yTrans, Interpolation interpolation, BorderExtender extender) throws CoverageProcessingException(Code) | | Translates and resizes an image.
Operations.Operations(Hints) Parameters: source - The source coverage. Parameters: xScale - The scale factor along the x axis. Parameters: yScale - The scale factor along the y axis. Parameters: xTrans - The translation along the x axis. Parameters: yTrans - The translation along the x axis. Parameters: interpolation - The interpolation to use, or null for the default. Parameters: be - The border extender, or null for the default. throws: CoverageProcessingException - if the operation can't be applied. See Also: org.geotools.coverage.processing.operation.Scale since: 2.3 |
|
|