Processing templates in SDK

View processes to run using the SDK.


Overview

Run advanced processing on tasking and catalog data in your storage.

View repository

Shared templates

Single-item templates

Single-item template classes represent processes that require a single STAC item. All single-item process template classes extend the SingleItemJobTemplate class.

Subclasses

Class nameProcess IDProcess
DetectionAircraftOIdetection-aircraft-oiAircraft detection
DetectionBuildingsSpaceptdetection-buildings-spaceptBuilding detection
DetectionCarsOIdetection-cars-oiCar detection
DetectionShadowsSpaceptdetection-shadows-spaceptShadow detection
DetectionShipsAirbusdetection-ships-airbusShip detection
DetectionStorageTanksAirbusdetection-storage-tanks-airbusStorage tank detection
DetectionTreesSpaceptdetection-trees-spaceptTree detection
DetectionTrucksOIdetection-trucks-oiTruck detection
DetectionWindTurbinesAirbusdetection-wind-turbines-airbusWind turbine detection

Pansharpening

Has more attributes, see its class.

pansharpeningPansharpening
UpsamplingNSupsampling-nsUpsampling
UpsamplingNSSentinelupsampling-ns-sentinelUpsampling (Sentinel-2)

Attributes

AttributeDescription
title

str

The title of the output objects: STAC item and STAC collection.

item

pystac.Item

The STAC item to process.

Python
from up42 import processing_templates
# Select an item
stac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC client
UP42_client = up42.stac_client()
stac_item = next(UP42_client.get_items(stac_item_id))
# Instanitate a DetectionTreesSpacept template
job_template = processing_templates.DetectionTreesSpacept(
title="Detect trees over UK",
item=stac_item,
)

Class: SimularityJobTemplate

A data class that represents a template for the Simularity processes. Extends the JobTemplate class.

Subclasses

Class nameProcess IDProcess
CoregistrationSimularitycoregistration-simularityCoregistration

DetectionChangeSimularity

Has more attributes, see its class.

detection-change-simularityChange detection

Attributes

AttributeDescription
title

str

The title of the output objects: STAC item and STAC collection.

source_item

pystac.Item

The source STAC item.

reference_item

pystac.Item

The reference STAC item. The positional accuracy of the source image will be improved against this reference.

Python
from up42 import processing_templates
# Select multiple items
source_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
reference_item_id = "c3de9ed8-f6e5-4bb5-a157-f6430ba756da"
# Get the items from the STAC client
UP42_client = up42.UP42_client()
source_item = UP42_client.get_item(source_item_id)
reference_item = UP42_client.get_item(reference_item_id)
# Instantiate a CoregistrationSimularity template
job_template = processing_templates.CoregistrationSimularity(
title="Coregistration for images",
source_item=source_item,
reference_item=reference_item,
)

Class: DetectionChangeSimularity

A data class that represents a template for the Change detection process. Extends the SimularityJobTemplate class.

Attributes

AttributeDescription
sensitivity

int

The setting that adjusts the sensitivity to change. The range of allowed values spans from 0 (lowest sensitivity) to 5 (highest sensitivity). The default value is 2.

Python
from up42 import processing_templates
# Select multiple items
source_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
reference_item_id = "c3de9ed8-f6e5-4bb5-a157-f6430ba756da"
# Get the items from the STAC client
UP42_client = up42.UP42_client()
source_item = UP42_client.get_item(source_item_id)
reference_item = UP42_client.get_item(reference_item_id)
# Instantiate a DetectionChangeSimularity template
job_template = processing_templates.DetectionChangeSimularity(
title="Detecting changes over Berlin",
source_item=source_item,
reference_item=reference_item,
sensitivity=4,
)

Class: Pansharpening

A data class that represents a template for the Pansharpening process. Extends the class used for single-item processes.

Attributes

AttributeDescription
grey_weights

Optional[List[GreyWeight]]

The weight factors by which spatial details of multispectral bands are scaled.

Python
from up42 import processing_templates
# Select an item
stac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC client
UP42_client = up42.stac_client()
stac_item = next(UP42_client.get_items(stac_item_id))
# Instantiate a Pansharpening template with grey weights
job_template = processing_templates.Pansharpening(
title="Pansharpen item",
item=stac_item,
grey_weights=[
processing_templates.GreyWeight(band="red", weight=0.04),
processing_templates.GreyWeight(band="blue", weight=0.9),
processing_templates.GreyWeight(band="green", weight=0.2),
],
)

Class: GreyWeight

A data class that represents the weight factors by which to scale spatial details of multispectral bands.

  • If not specified, the process uses either sensor-optimized weights or optimal generated weights.
  • If you specify the weights yourself, you must define at least 3 bands.

Attributes

AttributeDescription
band

str

The name of the band from the STAC asset with the ["data", "multispectral"] roles.

weight

float

The multiplication value that lets you modulate the influence of multispectral bands on the final image. The range of allowed values spans from -1 to 1.

Python
from up42 import processing_templates
# Select an item
stac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC client
UP42_client = up42.stac_client()
stac_item = next(UP42_client.get_items(stac_item_id))
# Instantiate a Pansharpening template with grey weights
job_template = processing_templates.Pansharpening(
title="Pansharpen item",
item=stac_item,
grey_weights=[
processing_templates.GreyWeight(band="red", weight=0.04),
processing_templates.GreyWeight(band="blue", weight=0.9),
processing_templates.GreyWeight(band="green", weight=0.2),
],
)

Learn more

API docs | Processing Console docs | Processing

Last updated: