public abstract class PointOperator extends Operator
PointOperator class serves as a base class for operators
GeoCoding.| Constructor and Description |
|---|
PointOperator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRasterSize()
Checks if all source products share the same raster size, otherwise throws an exception.
|
protected abstract void |
configureSourceSamples(SourceSampleConfigurer sampleConfigurer)
Configures all source samples that this operator requires for the computation of target samples.
|
protected void |
configureTargetProduct(ProductConfigurer productConfigurer)
Configures the target product via the given
ProductConfigurer. |
protected abstract void |
configureTargetSamples(TargetSampleConfigurer sampleConfigurer)
Configures all target samples computed by this operator.
|
protected Product |
createTargetProduct()
Creates the target product instance.
|
void |
dispose()
Releases the resources the operator has acquired during its lifetime.
|
void |
initialize()
Configures this
PointOperator by performing a number of initialisation steps in the given order:
prepareInputs()
createTargetProduct()
configureTargetProduct(ProductConfigurer)
configureSourceSamples(SourceSampleConfigurer)
configureTargetSamples(TargetSampleConfigurer)
This method cannot be overridden by intention (template method). |
protected void |
prepareInputs()
Prepares the inputs for this operator.
|
canComputeTile, canComputeTileStack, checkForCancellation, computeTile, computeTileStack, deactivateComputeTileMethod, doExecute, ensureSceneGeoCoding, ensureSingleRasterSize, ensureSingleRasterSize, execute, finalize, getId, getLogger, getParameter, getParameter, getProductManager, getSourceProduct, getSourceProduct, getSourceProductId, getSourceProducts, getSourceTile, getSourceTile, getSpi, getTargetProduct, getTargetProperty, setLogger, setParameter, setParameterDefaultValues, setRequiresAllBands, setSourceProduct, setSourceProduct, setSourceProducts, setSpi, setTargetProduct, stopTileComputationObservation, updatepublic final void initialize()
throws OperatorException
PointOperator by performing a number of initialisation steps in the given order:
This method cannot be overridden by intention (template method). Instead clients may wish to
override the methods that are called during the initialisation sequence.initialize in class OperatorOperatorException - If the configuration cannot be performed.Operator.getTargetProduct()protected void prepareInputs()
throws OperatorException
initialize().
Clients may override to perform some extra validation of
parameters and source products and/or to load external, auxiliary resources. External resources that may be opened
by this method and that must remain open during the Operator's lifetime shall be closed
by a dedicated override of the dispose() method.
Failures of input preparation shall be indicated by throwing an OperatorException.
The default implementation checks whether all source products have the same raster size.
Clients that require a similar behaviour in their operator shall first call the super method
in their implementation.
OperatorException - If the validation of input fails.public void dispose()
Operator
Overrides should make sure to call super.dispose() as well.
protected Product createTargetProduct() throws OperatorException
initialize().
The default implementation creates a target product instance given the raster size of the (first) source product.
OperatorException - If the target product cannot be created.protected void configureTargetProduct(ProductConfigurer productConfigurer)
ProductConfigurer. Called by initialize().
Client implementations of this method usually add product components to the given target product, such as
bands to be computed by this operator,
virtual bands,
masks
or sample codings.
The default implementation retrieves the (first) source product and copies to the target product
ProductConfigurer.copyTimeCoding(),ProductConfigurer.copyTiePointGrids(String...),ProductConfigurer.copyGeoCoding().
Clients that require a similar behaviour in their operator shall first call the super method
in their implementation.
productConfigurer - The target product configurer.OperatorException - If the target product cannot be configured.Product.addBand(Band),
Product.addBand(String, String),
Product.addTiePointGrid(TiePointGrid),
Product.getMaskGroup()protected abstract void configureSourceSamples(SourceSampleConfigurer sampleConfigurer) throws OperatorException
SourceSampleConfigurer.
The method is called by initialize().
sampleConfigurer - The configurer that defines the layout of a pixel.OperatorException - If the source samples cannot be configured.protected abstract void configureTargetSamples(TargetSampleConfigurer sampleConfigurer) throws OperatorException
TargetSampleConfigurer.
The method is called by initialize().
sampleConfigurer - The configurer that defines the layout of a pixel.OperatorException - If the target samples cannot be configured.protected final void checkRasterSize()
throws OperatorException
initialize().OperatorException - If the source product's raster sizes are not equal.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.