Quickstart
This is a workflow example for basic processing.
Python
# Initialize the Environment.
from gbdxtools import Interface
gbdx = Interface()
tasks = []
output_location = 'ENVI/RasterStatistics'
cat_id = '103001005A9A9400'
# Image Auto ordering task parameters
order = gbdx.Task("Auto_Ordering")
order.inputs.cat_id = cat_id
order.impersonation_allowed = True
order.persist = True
order.timeout = 36000
tasks += [order]
# Image AOP task parameters
aop = gbdx.Task("AOP_Strip_Processor")
aop.inputs.data = order.outputs.s3_location.value
aop.inputs.bands = 'MS'
aop.inputs.enable_dra = False
aop.outputs.data.persist = True
aop.outputs.data.persist_location = output_location+'/aop'
aop.timeout = 36000
tasks += [aop]
envi_raster_stats = gbdx.Task("ENVI_RasterStatistics")
envi_raster_stats.inputs.input_raster = aop.outputs.data.value
envi_raster_stats.inputs.compute_covariance = True
tasks += [envi_raster_stats]
workflow = gbdx.Workflow(tasks)
workflow.savedata(envi_raster_stats.outputs.task_meta_data, location=output_location)
workflow.savedata(envi_raster_stats.outputs.eigenvectors, location=output_location)
workflow.savedata(envi_raster_stats.outputs.min, location=output_location)
workflow.savedata(envi_raster_stats.outputs.max, location=output_location)
workflow.savedata(envi_raster_stats.outputs.npixels, location=output_location)
workflow.savedata(envi_raster_stats.outputs.correlation, location=output_location)
workflow.savedata(envi_raster_stats.outputs.covariance, location=output_location)
workflow.savedata(envi_raster_stats.outputs.stddev, location=output_location)
workflow.savedata(envi_raster_stats.outputs.eigenvalues, location=output_location)
workflow.savedata(envi_raster_stats.outputs.mean, location=output_location)
workflow.execute()
Inputs
The following table lists all ENVI_RasterStatistics inputs.
Mandatory (optional) settings are listed as Required = True (Required = False).
Name | Required | Default | Valid Values | Description |
---|---|---|---|---|
file_types | False | N/A | string | GBDX Option. Comma seperated list of permitted file type extensions. Use this to filter input files -- Value Type: STRING[*] |
input_raster | True | N/A | See ENVIRASTER input type | Specify a raster from which to generate statistics. -- Value Type: ENVIRASTER |
input_raster_format | False | N/A | See ENVIRASTER input type | Provide the format of the image, for example: landsat-8. -- Value Type: STRING |
input_raster_band_grouping | False | N/A | See ENVIRASTER input type | Provide the name of the band grouping to be used in the task, ie - panchromatic. -- Value Type: STRING |
input_raster_filename | False | N/A | See ENVIRASTER input type | Provide the explicit relative raster filename that ENVI will open. This overrides any file lookup in the task runner. -- Value Type: STRING |
compute_covariance | False | false | string | Set this property to true to compute covariance matrix, eigenvectors, eigenvalues, and correlation on the raster. The options are true or false (default). -- Value Type: BOOLEAN -- Default Value: false |
Outputs
The following table lists all ENVI_RasterStatistics outputs.
Mandatory (optional) settings are listed as Required = True (Required = False).
Name | Required | Default | Valid Values | Description |
---|---|---|---|---|
task_meta_data | False | N/A | directory | GBDX Option. Output location for task meta data such as execution log and output JSON |
eigenvectors | True | N/A | string | This is the eigenvectors of the data. -- Value Type: DOUBLEARRAY |
min | True | N/A | string | This is the minimum data value of each band. -- Value Type: DOUBLEARRAY |
max | True | N/A | string | This is the maximum data value of each band. -- Value Type: DOUBLEARRAY |
npixels | True | N/A | string | This is the number of pixels in the raster. -- Value Type: ULONG64 |
correlation | True | N/A | string | This is the correlation matrix of the data. -- Value Type: DOUBLEARRAY |
covariance | True | N/A | string | This is the covariance matrix of the data. -- Value Type: DOUBLEARRAY |
stddev | True | N/A | string | This is the standard deviation data value of each band. -- Value Type: DOUBLEARRAY |
eigenvalues | True | N/A | string | This is the eigenvalues of the data. -- Value Type: DOUBLEARRAY |
mean | True | N/A | string | This is the mean data value of each band. -- Value Type: DOUBLEARRAY |
Output structure
The output files will be written to the specified S3 Customer Account Location.
Background
For additional background information on this task please refer to the Harris Geospatial ENVI documentation and
ENVI® Raster Statistics.
Contact
If you have any questions or issues with this task, please contact gbdx-support@digitalglobe.com.