Apply advanced processing to purchased geospatial data.
View repositorySingle-item template classes represent processes that require a single STAC item. For these template classes, the following input is required:
- A title for the job
- A single STAC item
The UP42 SDK provides a distinct class for each of these processes, with each class containing the necessary process ID. All single-item template classes extend the SingleItemJobTemplate class.
Class name | Process ID | Process |
---|---|---|
DetectionAircraftOI | detection-aircraft-oi | Aircraft detection |
DetectionBuildingsSpacept | detection-buildings-spacept | Building detection |
DetectionCarsOI | detection-cars-oi | Car detection |
DetectionShadowsSpacept | detection-shadows-spacept | Shadow detection |
DetectionShipsAirbus | detection-ships-airbus | Ship detection |
DetectionStorageTanksAirbus | detection-storage-tanks-airbus | Storage tank detection |
DetectionTreesSpacept | detection-trees-spacept | Tree detection |
DetectionTrucksOI | detection-trucks-oi | Truck detection |
DetectionWindTurbinesAirbus | detection-wind-turbines-airbus | Wind turbine detection |
from up42 import processing_templates
# Select an itemstac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC clientstac_client = up42.stac_client()stac_item = next(stac_client.get_items(stac_item_id))
# Instanitate a DetectionTreesSpacept templatetemplate = processing_templates.DetectionTreesSpacept( title="Detect trees over UK", item=stac_item,)
Multi-item template classes represent processes that require more than one STAC item. For these template classes, the following input is required:
- A title for the job
- Multiple STAC items
The UP42 SDK provides a distinct class for each of these processes, with each class containing the necessary process ID. All single-item template classes extend the MultiItemJobTemplate class.
Class name | Process ID | Process |
---|---|---|
DetectionChangePleiadesHyperverge | detection-change-pleiades-hyperverge | Infrastructure change detection (Pléiades) |
DetectionChangeSpacept | detection-change-spacept | Change detection |
DetectionChangeSPOTHyperverge | detection-change-spot-hyperverge | Infrastructure change detection (SPOT) |
from up42 import processing_templates
# Select multiple itemsstac_item1_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"stac_item2_id = "c3de9ed8-f6e5-4bb5-a157-f6430ba756da"
# Get the items from the STAC clientstac_client = up42.stac_client()stac_item1 = next(stac_client.get_items(stac_item1_id))stac_item2 = next(stac_client.get_items(stac_item2_id))
# Instantiate a DetectionChangeSpacept templatetemplate = processing_templates.DetectionChangeSpacept( title="Detect changes", items=[stac_item1, stac_item2],)
A data class that represents a template for the Coregistration process. Extends the JobTemplate class.
Constants
Constant | Description | Value |
---|---|---|
process_id | The process ID. | coregistration-simularity |
Attributes
Attribute | Description |
---|---|
title | str A user-defined title for the coregistration job. |
source_item | pystac.Item The STAC item representing the source image to be coregistered. |
reference_item | pystac.Item The STAC Item representing the reference image for coregistration. The positional accuracy of the source image will be improved against this reference. |
from up42 import processing_templates
# Select multiple itemssource_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"reference_item_id = "c3de9ed8-f6e5-4bb5-a157-f6430ba756da"
# Get the items from the STAC clientstac_client = up42.stac_client()source_item = next(stac_client.get_items(source_item_id))reference_item = next(stac_client.get_items(reference_item_id))
# Instantiate a CoregistrationSimularity templatetemplate = processing_templates.CoregistrationSimularity( title="Coregistration for images", source_item=source_item, reference_item=reference_item,)
A data class that represents a template for the Upsampling process. Extends the SingleItemJobTemplate class.
Constants
Constant | Description | Value |
---|---|---|
process_id | The process ID. | upsampling-ns |
Attributes
Attribute | Description |
---|---|
ned | bool Whether the NIR, red edge, and deep blue bands need to be upsampled. If rgb is true, then ned must be set to false. The default value is false . |
rgb | bool Whether the red, green, and blue bands need to be upsampled. If ned is true, then rgb must be set to false. The default value is true . |
from up42 import processing_templates
# Select an itemstac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC clientstac_client = up42.stac_client()stac_item = next(stac_client.get_items(stac_item_id))
# Instantiate an UpsamplingNS templatetemplate = processing_templates.UpsamplingNS( title="Upsample item", item=stac_item, ned=True, # Set NED to True rgb=False, # Set RGB to False)
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
Attribute | Description |
---|---|
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 . |
from up42 import processing_templates
# Select an itemstac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC clientstac_client = up42.stac_client()stac_item = next(stac_client.get_items(stac_item_id))
# Instantiate a Pansharpening template with grey weightstemplate = 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), ],)
A data class that represents a template for the Pansharpening process. Extends the SingleItemJobTemplate class.
Constants
Constant | Description | Value |
---|---|---|
process_id | The process ID. | pansharpening |
Attributes
Attribute | Description |
---|---|
grey_weights | Optional[List[GreyWeight]] The weight factors by which spatial details of multispectral bands are scaled. |
from up42 import processing_templates
# Select an itemstac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC clientstac_client = up42.stac_client()stac_item = next(stac_client.get_items(stac_item_id))
# Instantiate a Pansharpening template with grey weightstemplate = 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), ],)