@OperatorMetadata(alias="Subset", category="Raster/Geometric", authors="Marco Zuehlke, Norman Fomferra, Marco Peters", version="1.2", copyright="(c) 2011 by Brockmann Consult", description="Create a spatial and/or spectral subset of a data product.") public class SubsetOp extends Operator
region
)
or a geographical polygon (parameter geoRegion
). Subsets of band and tie-point grid
are given by name lists (parameters bandNames
and tiePointGridNames
).Modifier and Type | Class and Description |
---|---|
static class |
SubsetOp.Spi |
Constructor and Description |
---|
SubsetOp() |
Modifier and Type | Method and Description |
---|---|
static Rectangle |
computePixelRegion(Product product,
com.vividsolutions.jts.geom.Geometry geoRegion,
int numBorderPixels)
Non-API (yet).
|
void |
computeTile(Band band,
Tile targetTile,
ProgressMonitor pm)
Called by the framework in order to compute a tile for the given target band.
|
String[] |
getBandNames() |
com.vividsolutions.jts.geom.Geometry |
getGeoRegion() |
Rectangle |
getRegion() |
String[] |
getTiePointGridNames() |
void |
initialize()
Initializes this operator and sets the one and only target product.
|
void |
setBandNames(String[] bandNames) |
void |
setCopyMetadata(boolean copyMetadata) |
void |
setGeoRegion(com.vividsolutions.jts.geom.Geometry geoRegion) |
void |
setRegion(Rectangle region) |
void |
setSubSamplingX(int subSamplingX) |
void |
setSubSamplingY(int subSamplingY) |
void |
setTiePointGridNames(String[] tiePointGridNames) |
canComputeTile, canComputeTileStack, checkForCancellation, computeTileStack, deactivateComputeTileMethod, 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
public String[] getTiePointGridNames()
public void setTiePointGridNames(String[] tiePointGridNames)
public String[] getBandNames()
public void setBandNames(String[] bandNames)
public void setCopyMetadata(boolean copyMetadata)
public Rectangle getRegion()
public void setRegion(Rectangle region)
public void setSubSamplingX(int subSamplingX)
public void setSubSamplingY(int subSamplingY)
public com.vividsolutions.jts.geom.Geometry getGeoRegion()
public void setGeoRegion(com.vividsolutions.jts.geom.Geometry geoRegion)
public void initialize() throws OperatorException
Operator
The target product can be either defined by a field of type Product
annotated with the
TargetProduct
annotation or
by calling Operator.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 an Operator
instance.
If not already done, calling the Operator.getTargetProduct()
will always trigger
a call to the initialize()
method.
Any client code that must be performed before computation of tile data
should be placed here.
initialize
in class Operator
OperatorException
- If an error occurs during operator initialisation.Operator.getTargetProduct()
public void computeTile(Band band, Tile targetTile, ProgressMonitor pm) throws OperatorException
Operator
The default implementation throws a runtime exception with the message "not implemented".
This method shall never be called directly.
computeTile
in class Operator
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.OperatorException
- If an error occurs during computation of the target raster.Copyright © 2014–2017 European Space Agency (ESA). All rights reserved.