org.geotools.coverage.processing.operation
Class Add

Object
  extended by AbstractOperation
      extended by Operation2D
          extended by OperationJAI
              extended by Add
All Implemented Interfaces:
Serializable, Operation

public class Add
extends OperationJAI

Create a new coverage as the sum of two source coverages by doing pixel by pixel addition: result[0][0] = source0[0][0] + source1[0][0] ... ... result[i][j] = source0[i][j] + source1[i][j] ... ... result[n-1][m-1] = source0[n-1][m-1] + source1[n-1][m-1] Make sure coverages have same envelope and same resolution before using this operation.

Name: "Add"
JAI operator: "Add"
Parameters:

Name Class Default value Minimum value Maximum value
"Source0" GridCoverage2D N/A N/A N/A
"Source1" GridCoverage2D N/A N/A N/A

Since:
8.x
See Also:
Operations.add(org.opengis.coverage.Coverage, org.opengis.coverage.Coverage), Add, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class OperationJAI
OperationJAI.Parameters
 
Field Summary
 
Fields inherited from class OperationJAI
operation, RENDERED_MODE
 
Fields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0
 
Fields inherited from class AbstractOperation
descriptor
 
Constructor Summary
Add()
          Constructs a default "AddConst" operation.
 
Method Summary
protected  NumberRange deriveRange(NumberRange[] ranges, OperationJAI.Parameters parameters)
          Returns the expected range of values for the resulting image.
 
Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveSampleDimension, deriveUnit, doOperation, equals, getJAI, getOperationDescriptor, getProperties, getQuantitative, prepareParameters, resampleToCommonGeometry
 
Methods inherited from class Operation2D
computeOnGeophysicsValues, extractSources, getFactory
 
Methods inherited from class AbstractOperation
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, hashCode, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Add

public Add()
Constructs a default "AddConst" operation.

Method Detail

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 "GradientMagnitude", this array has a length of 1. For binary operations like "add" and "multiply", 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 null if unknow.


Copyright © 1996-2014 Geotools. All Rights Reserved.