Run advanced processing on tasking and catalog data in your storage.
View repositoryA class for job templates that define the process ID and input validation logic.
Attributes
| Attribute | Description |
|---|---|
process_id | ClassVar[str] The process ID in a name format. |
workspace_id | Union[str, base.WorkspaceId] The workspace ID. |
errors | set[ValidationError] A list of errors populated if the job isn’t valid. |
Properties
Checks if the job is valid. Returns bool:
True: The job is valid.False: The job isn’t valid.
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 TrueColorConversion templatejob_template = processing_templates.TrueColorConversion( title="Imagery over UK", item=stac_item,)
# Assert that the job is valid, print errors if notif not job_template.is_valid: for error in job_template.errors: print(f"{error}\n")Methods
Executes the job. Returns Job.
| Parameter | Description |
|---|
from up42 import processing_templates
# Select an item14 collapsed lines
stac_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 TrueColorConversion templatejob_template = processing_templates.TrueColorConversion( title="Imagery over UK", item=stac_item,)
# Select a budgetbudget_id = "a0d443a2-41e8-4995-8b54-a5cc4c448227"
# Execute the templated jobjob = job_template.execute(budget_id=budget_id)
# Define outputprint(f"Job details for ID: {job.id}")print(f"Process ID: {job.process_id}")print(f"Status: {job.status.value}")print(f"Price: {job.credits or 'N/A'} credits")print(f"Created at: {job.created}")A data class for the process templates that require one STAC item as input. Extends the JobTemplate class.
Attributes
| Attribute | Description |
|---|---|
title | str The title of the output objects: STAC item and STAC collection. |
item | pystac.Item The STAC item to process. |
from up42 import processing_templates
# Select an itemstac_item_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Get the item from the STAC clientUP42_client = up42.stac_client()stac_item = next(UP42_client.get_items(stac_item_id))
# Instanitate a TrueColorConversion templatejob_template = processing_templates.TrueColorConversion( title="Imagery over UK", item=stac_item,)Subclasses
| Class name | Process ID | Process |
|---|---|---|
TrueColorConversion | true-color-conversion | TrueColorConversion |