public class BandArithmetic extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
BandArithmetic.NamespaceExtender |
static interface |
BandArithmetic.ProductPrefixProvider |
Modifier and Type | Field and Description |
---|---|
static String |
PIXEL_X_NAME |
static String |
PIXEL_Y_NAME |
Modifier and Type | Method and Description |
---|---|
static void |
addNamespaceExtender(BandArithmetic.NamespaceExtender ne) |
static int |
computeBand(String expression,
String validMaskExpression,
Product[] sourceProducts,
int defaultProductIndex,
boolean checkInvalids,
boolean noDataValueUsed,
double noDataValue,
int offsetX,
int offsetY,
int width,
int height,
ProductData targetRasterData,
Scaling scaling,
com.bc.ceres.core.ProgressMonitor pm)
Deprecated.
Since BEAM 4.10. Use
VirtualBand or VirtualBandOpImage . |
static int |
computeBand(Term term,
Term validMaskTerm,
boolean checkInvalids,
boolean noDataValueUsed,
double noDataValue,
int offsetX,
int offsetY,
int width,
int height,
ProductData targetRasterData,
Scaling scaling,
com.bc.ceres.core.ProgressMonitor pm)
Deprecated.
Since BEAM 4.10. Use
VirtualBand or VirtualBandOpImage . |
static WritableNamespace |
createDefaultNamespace(Product[] products,
int defaultProductIndex)
Creates a default namespace for the product(s) given in an array.
|
static WritableNamespace |
createDefaultNamespace(Product[] products,
int defaultProductIndex,
BandArithmetic.ProductPrefixProvider prefixProvider)
Creates a default namespace for the product(s) given in an array.
|
static String |
createExternalName(String name)
Create an external name from the given name.
|
static void |
deregisterFunction(Function f)
De-registers an existing function
|
static void |
deregisterSymbol(Symbol s)
De-registers an existing symbol
|
static String |
getProductNodeNamePrefix(Product product)
Gets a symbol name prefix for the names of bands, tie point grids, flags, etc. of the given product.
|
static RasterDataSymbol[] |
getRefRasterDataSymbols(Term term)
Utility method which returns all raster data symbols references in a given term.
|
static RasterDataSymbol[] |
getRefRasterDataSymbols(Term[] terms)
Utility method which returns all raster data symbols references in a given term array.
|
static RasterDataNode[] |
getRefRasters(RasterDataSymbol[] rasterDataSymbols)
Utility method which returns all raster data nodes referenced in a given array of raster data symbols.
|
static RasterDataNode[] |
getRefRasters(String expression,
Product... products) |
static RasterDataNode[] |
getRefRasters(String expression,
Product[] products,
int defaultProductNamePrefix) |
static String |
getValidMaskExpression(String expression,
Product[] products,
int defaultProductIndex,
String validMaskExpression) |
static Term |
parseExpression(String expression,
Product[] products,
int defaultProductIndex)
Parses the given expression.
|
static void |
registerFunction(Function f)
Registers a new function
|
static void |
registerSymbol(Symbol s)
Registers a new symbol
|
static void |
removeNamespaceExtender(BandArithmetic.NamespaceExtender ne) |
public static final String PIXEL_X_NAME
public static final String PIXEL_Y_NAME
public static void addNamespaceExtender(BandArithmetic.NamespaceExtender ne)
public static void removeNamespaceExtender(BandArithmetic.NamespaceExtender ne)
public static void registerSymbol(Symbol s)
s
- the symbolpublic static void deregisterSymbol(Symbol s)
s
- the symbolpublic static void registerFunction(Function f)
f
- the functionpublic static void deregisterFunction(Function f)
f
- the functionpublic static Term parseExpression(String expression, Product[] products, int defaultProductIndex) throws ParseException
expression
- the expressionproducts
- the array of input productsdefaultProductIndex
- the index of the product for which also symbols without the
product prefix $ref-no
are registered in the namespaceParseException
- if a parse error occurspublic static WritableNamespace createDefaultNamespace(Product[] products, int defaultProductIndex)
products
- the array of input productsdefaultProductIndex
- the index of the product for which also symbols without the
product prefix $ref-no
are registered in the namespacenull
public static WritableNamespace createDefaultNamespace(Product[] products, int defaultProductIndex, BandArithmetic.ProductPrefixProvider prefixProvider)
products
- the array of input productsdefaultProductIndex
- the index of the product for which also symbols without the
product prefix $ref-no
are registered in the namespaceprefixProvider
- a product prefix providernull
@Deprecated public static int computeBand(String expression, String validMaskExpression, Product[] sourceProducts, int defaultProductIndex, boolean checkInvalids, boolean noDataValueUsed, double noDataValue, int offsetX, int offsetY, int width, int height, ProductData targetRasterData, Scaling scaling, com.bc.ceres.core.ProgressMonitor pm) throws ParseException, IOException
ParseException
IOException
@Deprecated public static int computeBand(Term term, Term validMaskTerm, boolean checkInvalids, boolean noDataValueUsed, double noDataValue, int offsetX, int offsetY, int width, int height, ProductData targetRasterData, Scaling scaling, com.bc.ceres.core.ProgressMonitor pm) throws IOException
IOException
public static String getValidMaskExpression(String expression, Product[] products, int defaultProductIndex, String validMaskExpression) throws ParseException
ParseException
public static RasterDataNode[] getRefRasters(String expression, Product... products) throws ParseException
ParseException
public static RasterDataNode[] getRefRasters(String expression, Product[] products, int defaultProductNamePrefix) throws ParseException
ParseException
public static RasterDataNode[] getRefRasters(RasterDataSymbol[] rasterDataSymbols)
rasterDataSymbols
argument can contain multiple references to the same raster data node,
e.g. if multilple SingleFlagSymbol
s refer to the same raster.rasterDataSymbols
- the array to be analysednull
but may be emptypublic static RasterDataSymbol[] getRefRasterDataSymbols(Term term)
term
- the term to be analysednull
but may be emptypublic static RasterDataSymbol[] getRefRasterDataSymbols(Term[] terms)
terms
- the term array to be analysednull
but may be emptypublic static String createExternalName(String name)
The method simply delgates to Tokenizer.createExternalName(String)
.
name
- the namepublic static String getProductNodeNamePrefix(Product product)
"$refNo."
where refNo is the product's reference
number returned by Product.getRefNo()
.product
- the product, must not be null
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.