GBDX

Auto Ordering Task Tutorial

This tutorial shows how to include the Auto Ordering task in a workflow.

Last Updated: April 11, 2019

Overview

We recommend including the Auto Ordering task in a Workflow. The input to this task is a catalog ID. When the Workflow is run, the Auto Ordering task will order the 1B product for the specified catalog ID.

Quickstart:

This example shows a simple workflow that starts with the Auto Ordering task, using the python-based project GBDXtools. The catalog ID ordered is used as an input to the AOP task.

PYTHON

from gbdxtools import Interface
gbdx = Interface()

tasks = []
output_location = '[add the output location here]'

cat_id = '105001000672E000'

# 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]

# Set up workflow save data
workflow = gbdx.Workflow(tasks)
workflow.savedata(aop.outputs.data, location=output_location)

workflow.execute()

What's Next

Learn how to order a list of catalog IDs with a request to the Ordering API

Place an Order

Auto Ordering Task Tutorial


This tutorial shows how to include the Auto Ordering task in a workflow.

Last Updated: April 11, 2019

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.