org.geotools.coverage.processing.operation
Class Rescale
java.lang.Object
org.geotools.coverage.processing.AbstractOperation
org.geotools.coverage.processing.Operation2D
org.geotools.coverage.processing.OperationJAI
org.geotools.coverage.processing.operation.Rescale
- All Implemented Interfaces:
- org.opengis.coverage.processing.Operation, java.io.Serializable
- public class Rescale
- extends OperationJAI
Maps the sample values of a coverage from one range to another range. The rescaling is done by
multiplying each sample value by one of a set of constants and then adding another constant to
the result of the multiplication. The destination sample values are defined by the pseudocode:
dst[x][y][b] =
src[x][y][b]*constant + offset;
Name: "Rescale"
JAI operator: "Rescale"
Parameters:
Name |
Class |
Default value |
Minimum value |
Maximum value |
|
GridCoverage2D |
N/A |
N/A |
N/A |
|
double[] |
1.0 |
N/A |
N/A |
|
double[] |
0.0 |
N/A |
N/A |
- Since:
- 2.2
- Version:
- $Id: Rescale.java 17672 2006-01-19 00:25:55Z desruisseaux $
- Author:
- Martin Desruisseaux
- See Also:
Operations.rescale(org.opengis.coverage.Coverage, double[], double[])
,
RescaleDescriptor
,
Serialized Form- To Do:
- Should operates on transform when possible.
See GEOT-610.
Constructor Summary |
Rescale()
Constructs a default operation. |
Methods inherited from class org.geotools.coverage.processing.OperationJAI |
computeOnGeophysicsValues, createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveSampleDimension, deriveUnit, doOperation, equals, getJAI, resampleToCommonGeometry |
Methods inherited from class org.geotools.coverage.processing.AbstractOperation |
ensureNonNull, getDescription, getDocURL, getName, getNumSources, getParameters, getProcessor, getVendor, getVersion, hashCode, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Rescale
public Rescale()
- Constructs a default operation.
deriveRange
protected NumberRange deriveRange(NumberRange[] ranges,
OperationJAI.Parameters parameters)
- Returns the expected range of values for the resulting image.
- Overrides:
deriveRange
in class OperationJAI
- Parameters:
ranges
- The range of values from every sources. For unary operations like
, this array has a length of 1. For binary operations
like and , this array has a length of 2.parameters
- Parameters, rendering hints and coordinate reference system to use.
- Returns:
- The range of values to use in the destination image, or if unknow.
- To Do:
- Not yet implemented.
Copyright © GeoTools. All Rights Reserved.