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 | |
To use this command refer to the following examples.
Example: Filter Uncertainty Data
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 | |
Example: Filter Contributor Data
Example | ||
Objective | You want to identify all data in a coverage that originated from the CUBE_05m_Final.csar dataset. | |
Description | Command Line Syntax | |
The "Depth" and "Contributor" bands will be filtered and the results included in the output. | --include-band Depth --include-band Contributor | |
The filter expression to use is: Contributor='file:///C:/Surfaces/CUBE_05m_Final.csar'. | --expression Contributor='file:///C:/Surfaces/CUBE_05m_Final.csar' | |
The source raster is CombinedSurface.csar located in the D:\BatchSample directory. | D:\BatchSample\CombinedSurface.csar | |
The resulting surface will be called ContributorData.csar, and located in the D:\BatchSample directory. | D:\BatchSample\ContributorData.csar | |
Command Line |
| |
Outcome | A new CSAR raster is created with a subset of the data from the specified bands in CombinedSurface.csar. The only nodes in the Depth and Contributor bands that are populated in the output are the ones with data that originated from the CUBE_05m_Final.csar dataset. | |
Notes | N/A | |
Example: Filter LAS Data
Example | ||
Objective | You want to generate a point cloud containing only the data classified as ground or vegetation. | |
Description | Command Line Syntax | |
The Classification band, originally imported from an LAS dataset, is to be included in the output. | --include-band Classification | |
To filter classification data values, each string value must be enclosed in single quotes. To filter all terrain data, the following expression is used: Classification = 'Ground' OR Classification = 'Low Vegetation' OR Classification = 'Medium Vegetation' OR Classification = 'High Vegetation' | --expression "Classification = 'Ground' OR Classification = 'Low Vegetation' OR Classification = 'Medium Vegetation' OR Classification = 'High Vegetation'" | |
The source raster is LASSurface.csar located in the D:\BatchSample directory. | D:\BatchSample\LASSurface.csar | |
The resulting surface will be called LASClassificationData.csar, and located in the D:\BatchSample directory. | D:\BatchSample\LASClassificationData.csar | |
Command Line |
| |
Outcome | A point cloud is created containing only the areas classified as ground or vegetation. | |
Notes | N/A | |