Class ReadOp
- java.lang.Object
-
- org.esa.snap.core.gpf.Operator
-
- org.esa.snap.core.gpf.common.ReadOp
-
@OperatorMetadata(alias="Read", category="Input-Output", version="1.2", authors="Marco Zuehlke, Norman Fomferra", copyright="(c) 2010 by Brockmann Consult", description="Reads a data product from a given file location.") public class ReadOp extends Operator
Reads the specified file as product. This operator may serve as a source node in processing graphs, especially if multiple data products need to be read in.Here is a sample of how the
Read
operator can be integrated as a node within a processing graph:<node id="readNode"> <operator>Read</operator> <parameters> <file>/eodata/SST.nc</file> <formatName>GeoTIFF</formatName> </parameters> </node>
- Since:
- BEAM 4.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReadOp.Spi
-
Constructor Summary
Constructors Constructor Description ReadOp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeTile(Band band, Tile targetTile, ProgressMonitor pm)
Called by the framework in order to compute a tile for the given target band.void
initialize()
Initializes this operator and sets the one and only target product.-
Methods inherited from class org.esa.snap.core.gpf.Operator
canComputeTile, canComputeTileStack, checkForCancellation, computeTileStack, dispose, 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, update
-
-
-
-
Method Detail
-
initialize
public void initialize() throws OperatorException
Description copied from class:Operator
Initializes this operator and sets the one and only target product.The target product can be either defined by a field of type
Product
annotated with theTargetProduct
annotation or by callingOperator.setTargetProduct(org.esa.snap.core.datamodel.Product)
method.This method shall never be called directly. The framework calls this method after it has created an instance of this
Operator
. This will occur only once durting the lifetime of anOperator
instance. If not already done, calling theOperator.getTargetProduct()
will always trigger a call to theinitialize()
method.Any client code that must be performed before computation of tile data should be placed here.
- Specified by:
initialize
in classOperator
- Throws:
OperatorException
- If an error occurs during operator initialisation.- See Also:
Operator.getTargetProduct()
-
computeTile
public void computeTile(Band band, Tile targetTile, ProgressMonitor pm) throws OperatorException
Description copied from class:Operator
Called by the framework in order to compute a tile for the given target band.The default implementation throws a runtime exception with the message "not implemented".
This method shall never be called directly.
- Overrides:
computeTile
in classOperator
- Parameters:
band
- The target band.targetTile
- The current tile associated with the target band to be computed.pm
- A progress monitor which should be used to determine computation cancellation requests.- Throws:
OperatorException
- If an error occurs during computation of the target raster.
-
-