Description
The FilterCoverage process creates a new coverage with only the nodes that pass the criteria in an expression.
Inputs
A raster in a supported format.
Outputs
A raster in CSAR format.
Command Line Syntax
carisbatch --run FilterCoverage --include-band <value>
--expression <value> [options] <input> <output>
Options
The following table describes the parameters available for this process.
Parameter |
| |||
Long | Short | Description | Can Repeat | Notes
|
--include-band | b | A string specifying the name of a band to include in the output. The ALL keyword is used to include all bands in the output. | TRUE | |
--expression | e | A string specifying a Boolean expression. The following operations are supported: AND, OR, +, -, *, /, ^ (exponent), <, >, =, and != (not equal). For example, "Depth > 1 AND Std_Dev < 2". | FALSE | |
Example
To use this command refer to the following example.
Example | ||
Objective | You want to identify all valid data with an uncertainty value of less than 1m. | |
Description | Command Line Syntax | |
The "Depth", "Uncertainty" and "Depth and Holidays" bands will be filtered and the results included in the output. | --include-band Depth --include-band Uncertainty --include-band "Depth and Holidays" | |
The filter expression to use is: "Uncertainty < 1m AND \"Depth and Holidays\" = 1". | --expression "Uncertainty < 1m AND \"Depth and Holidays\" = 1" | |
The source raster is Surface.csar located in the D:\BatchSample directory. | D:\BatchSample\Surface.csar | |
The resulting surface will be called FilteredData.csar, and located in the D:\BatchSample directory. | D:\BatchSample\FilteredData.csar | |
Command Line |
| |
Outcome | A new CSAR raster is created with a subset of the data from the specified bands in Surface.csar. The Uncertainty band is filtered according to the boolean expression to include only nodes with an uncertainty of less than 1m, but only where the Depth and Holidays band was populated with a value of 1. All included bands are also only populated in the locations where all the values in the specified bands in the input coverage pass the expression filter. | |
Notes | N/A | |