GBDX

Water Mask (RETIRED)

This task was retired from the GBDX Platform on 7/23/2018, and is no longer supported. Please use Automated Land Cover Classification (LULC).

GBDX Registered Name: protogenV2RAW
Provider: GBDX
Inputs: .TIF, .TIL, .HDR
Outputs: TIF image type UINT8x1
Compatible bands & sensors: WorldView 2 or WorldView 3 multi-spectral imagery (8-band optical and VNIR data sets) that has been atmospherically compensated by the AOP processor.

This task uses an old version of the automated land cover classification algorithm

Table of Contents

Section Description
Imagery Examples Before and after example
Quickstart Get started with a Python-based quickstart tutorial
Task Runtime Benchmark runtimes for the algorithm
Input Options Required and optional task inputs
Outputs Task outputs and example contents
Advanced Options Additional information for advanced users
Known Issues Issues users should be aware of

Imagery Example

Output image with water mask applied

Output image with water mask applied

Quickstart Tutorial

This script gives the example of a water mask with a single tif file as input.

# Quickstart Example producing a single band water mask from a tif file.
# First Initialize the Environment

from gbdxtools import Interface
gbdx = Interface()

#Edit the following path to reflect a specific path to an image
raster = 's3://gbd-customer-data/CustomerAccount#/PathToImage/'
prototask = gbdx.Task("protogenV2RAW", raster=raster)

workflow = gbdx.Workflow([ prototask ])  
#Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)
workflow.savedata(prototask.outputs.data, location="RAW")
workflow.execute()

print workflow.id
print workflow.status

Task Runtime

These are the average runtimes for this algorithm. All benchmark tests were run using a standard set of images, based on our most common customer scenarios. Runtime benchmarks apply to the specific algorithm, and don’t represent the runtime of a complete workflow.

Sensor Name Total Pixels Total Area (k2) Time(secs) Time/Area k2
WV02 35,872,942 329.87 230.29 0.70
WV03 35,371,971 196.27 300.31 1.53

Input Options

This task will process only WorldView 2 or WorldView 3 multi-spectral imagery (8-band optical and VNIR data sets) that has been atmospherically compensated by the Advanced Image Preprocessor (AOP_Strip_Processor). Supported formats are .TIF, .TIL, .VRT, .HDR.

The following table lists the Water Mask task inputs.
All inputs are required.

Name Default Valid Values Description
raster N/A S3 URL .TIF only S3 location of input .tif file processed through AOP_Strip_Processor.
data true Folder name in S3 location This will explain the output file location and provide the output in .TIF format.

OPTIONAL SETTINGS: Required = False

No additional optional settings for this task exist.

Outputs

The following table lists the Water Mask task outputs:

Name Required Description
data Y This will explain the output file location and provide the output in .TIF format.
log N S3 location where logs are stored.

Advanced Options

To link the workflow of one input image into Advanced Image Preprocessor (AOP_Strip_Processor) into this task, you must use the follow gbdxtoools script in python:

#First initalize the environment
#AOP strip processor has input values known to complete the Protogen tasks

from gbdxtools import Interface
gbdx = Interface()

#Edit the following path to reflect a specific path to an image
data = 's3://gbd-customer-data/CustomerAccount#/PathToImage/'

aoptask2 = gbdx.Task('AOP_Strip_Processor', data=data, bands='MS', enable_acomp=True, enable_pansharpen=False, enable_dra=False)     # creates acomp'd multispectral image

gluetask = gbdx.Task('gdal-cli')      
# move aoptask output to root where prototask can find it
gluetask.inputs.data = aoptask2.outputs.data.value
gluetask.inputs.execution_strategy = 'runonce'
gluetask.inputs.command = """mv $indir/*/*.tif $outdir/"""
prototask = gbdx.Task('protogenV2RAW')
prototask.inputs.raster = gluetask.outputs.data.value


workflow = gbdx.Workflow([aoptask2, gluetask, prototask])
#Edit the following line(s) to reflect specific folder(s) for the output file (example location provided)
workflow.savedata(prototask.outputs.data, location='RAW')

workflow.execute()

workflow.status

Data Structure for Expected Outputs:

Your processed imagery will be written as binary .TIF image type UINT8x1 and placed in the specified S3 Customer Location (e.g. s3://gbd-customer-data/unique customer id/named directory/).

Known Issues

1) To run the task in a single workflow with Advanced Image Preprocessor, the tif file must first be removed from the AOP folder with the additional python commands listed in the Advanced section.

2)False positives maybe present due to certain types of concrete roofs or shadows.

Contact Us

If you have any questions or issues with this task, please contact gbdx-support@digitalglobe.com .