Create tasking and catalog orders.
View repositoryConstants
Constant | Description | Value |
---|---|---|
OrderType | Order types:
| Literal["TASKING", "ARCHIVE"] |
OrderDetails | Order details of both order types. | Union[ArchiveOrderDetails, TaskingOrderDetails] |
A class that represents the schema for the order parameters.
Attributes
Attribute | Description |
---|---|
dataProduct | str The data product ID. |
displayName | str A human-readable name that describes the order. |
params | Dict[str, Any] Order parameters. |
featureCollection | Dict[str, Any] A GeoJSON FeatureCollection representing the order’s geometry. |
tags | List[str] A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters ( |
A class that provides sorting options for orders.
Attributes
Attribute | Description |
---|---|
created_at | utils.SortingField Sorts by creation date. The default order is ascending. |
updated_at | utils.SortingField Sorts by update date. The default order is ascending. |
type | utils.SortingField Sorts by order type. The default order is catalog orders first, tasking second. |
status | utils.SortingField Sorts by order status. The default order is ascending. |
from itertools import islice
# Sort by creation date, from the most recent to the earliestorders_sorted = up42.Order.all(sort_by=up42.OrderSorting.created_at.desc)
# Sort by the last update date, from the most recent to the earliest# orders_sorted = up42.Order.all(sort_by=up42.OrderSorting.updated_at.desc)
# Sort by order type, tasking first, catalog second# orders_sorted = up42.Order.all(sort_by=up42.OrderSorting.type.desc)
# Sort by order status, in the order of progression# orders_sorted = up42.Order.all(sort_by=up42.OrderSorting.status.asc)
# Define output for one of the sorting examplesfor order in islice(orders_sorted, 0, 5): # Print first 5 results print(f"- Order ID: {order.id}") print(f" Display name: {order.display_name}") print(f" Status: {order.status}") print(f" Type: {order.type}\n")
A data class that represents catalog order details.
Attributes
Attribute | Description |
---|---|
aoi | dict Geometry in the GeoJSON format. |
image_id | Optional[str] The ID of the image scene. |
# Select a catalog orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)
# Define output from the Order classprint(f"Order details for ID: {order.id}")print(f"Display name: {order.display_name}")print(f"Status: {order.status}")print(f"Type: {order.type}")print(f"Data product ID: {order.data_product_id}")print(f"Tags: {', '.join(order.tags) if order.tags else 'No tags'}")
# Define output from the ArchiveOrderDetails classprint("\nCatalog-specific details:")print(f"Image ID: {order.details.image_id}")print(f"Geometry: {order.details.aoi}")
A data class that represents tasking order details.
Attributes
Attribute | Description |
---|---|
acquisition_start | str The date and time when the sensor started the acquisition process. |
acquisition_end | str The date and time when the sensor finished the acquisition process. |
geometry | dict Geometry in the GeoJSON format. |
extra_description | Optional[str] An additional order description. |
sub_status | Optional[OrderSubStatus] An additional status for the tasking order. |
acquisition_mode | Optional[str] A tasking order parameter that represents the operation mode specifying the way the images will be taken. |
max_cloud_cover | Optional[int] A tasking order parameter that represents the maximum percentage of a delivered asset that can be covered by clouds. |
max_incidence_angle | Optional[int] A tasking order parameter that represents the maximum allowed angle between the ground normal and look direction from the satellite. |
geometric_processing | Optional[str] A tasking order parameter that represents the level of geometric transformation and manipulation applied to data. |
projection | Optional[str] A tasking order parameter that represents the projection reference system that will be used for the processing and georeferencing. |
pixel_coding | Optional[str] A tasking order parameter that represents the number of bits used to represent the color or intensity of a single pixel in a digital image. |
radiometric_processing | Optional[str] A tasking order parameter that represents the level of radiometric transformation and manipulation applied to data. |
spectral_bands | Optional[str] A tasking order parameter that represents spectral bands, that is, specific ranges of wavelengths on the spectrum. They can be delivered separately or as combinations or bundles. |
priority | Optional[str] A tasking order parameter that represents the priority of the order. |
min_bh | Optional[int] A tasking order parameter that represents the lower limit on the baseline-to-height ratio that determines how close apart stereo or tri-stereo images will be taken relative to the height of the passing imaging system. |
max_bh | Optional[int] A tasking order parameter that represents the upper limit on the baseline-to-height ratio that determines how close apart stereo or tri-stereo images will be taken relative to the height of the passing imaging system. |
resolution | Optional[str] A tasking order parameter that represents the ability to distinguish objects in an image. The higher the resolution of a given collection, the more pixels there are per unit area, and the more detailed ground objects are. |
polarization | Optional[str] A tasking order parameter that represents the direction of travel of an electromagnetic wave: vertical (V) or horizontal (H). The first letter corresponds to how signals are emitted, and the second letter corresponds to how they are received. |
scene_size | Optional[str] A tasking order parameter that represents the sizes of delivered scenes intersecting the defined AOI or POI. |
looks | Optional[str] A tasking order parameter that represents the number of times a sensor captures the target. |
# Select a tasking orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)9 collapsed lines
# Define output from the Order classprint(f"Order details for ID: {order.id}")print(f"Display name: {order.display_name}")print(f"Status: {order.status}")print(f"Type: {order.type}")print(f"Data product ID: {order.data_product_id}")print(f"Tags: {', '.join(order.tags) if order.tags else 'No tags'}")
# Define output from the TaskingOrderDetails class# Parameters fo optical and SAR collectionsprint("\nTasking-specific details:")print(f"Substatus: {order.details.sub_status}")print(f"Acquisition start: {order.details.acquisition_start}")print(f"Acquisition end: {order.details.acquisition_end}")print(f"Extra description: {order.details.extra_description}")print(f"Geometry: {order.details.geometry}")print(f"Acquisition mode: {order.details.acquisition_mode}")print(f"Maximum incidence angle: {order.details.max_incidence_angle}")print(f"Priority: {order.details.priority}")# Parameters only for optical collections10 collapsed lines
print(f"Maximum cloud coverage: {order.details.max_cloud_cover}")print(f"Geometric processing level: {order.details.geometric_processing}")print(f"Coordinate reference system: {order.details.projection}")print(f"Bit depth per pixel: {order.details.pixel_coding}")print(f"Radiometric processing level: {order.details.radiometric_processing}")print(f"Spectral bands combination: {order.details.spectral_bands}")print(f"Minimum B/H ratio: {order.details.min_bh}")print(f"Maximum B/H ratio: {order.details.max_bh}")print(f"Resolution: {order.details.resolution}")print(f"Scene size: {order.details.scene_size}")# Parameters only for SAR collections2 collapsed lines
print(f"Polarization: {order.details.polarization}")print(f"Number of looks: {order.details.looks}")
A data class that represents an order in the system.
Attributes
Attribute | Description |
---|---|
id | str The order ID. |
display_name | str A human-readable name that describes the order. |
status | OrderStatus The order status. |
workspace_id | str The workspace ID. |
account_id | str The account ID. |
type | OrderType The order type. |
details | Optional[OrderDetails] Order details. |
data_product_id | Optional[str] The data product ID. |
tags | Optional[list[str]] A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters ( |
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)
# Define outputprint(f"Order details for ID: {order.id}")print(f"Display name: {order.display_name}")print(f"Status: {order.status}")print(f"Type: {order.type}")print(f"Data product ID: {order.data_product_id}")print(f"Order tags: {', '.join(order.tags) if order.tags else 'No tags'}")
Properties
3.0.0
. Use the Order class’s details
attribute. Retrieves the details of a specific order. Returns dict
.
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)order.order_details
3.0.0
. Use the Order class’s id
attribute. Retrieves the order ID. Returns str
.
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)order.order_id
Checks if the order is fulfilled. Returns bool
:
True
: The order has theFULFILLED
status.False
: The order has any other status.
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)order.is_fulfilled
Methods
Retrieves a specific order by its ID. Returns Order
.
Parameter | Description |
---|---|
order_id | str The order ID. |
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order infoorder = up42.Order.get(order_id=order_id)
# Define outputprint(f"Order details for ID: {order.id}")print(f"Display name: {order.display_name}")print(f"Status: {order.status}")print(f"Type: {order.type}")print(f"Data product ID: {order.data_product_id}")print(f"Order tags: {', '.join(order.tags) if order.tags else 'No tags'}")
Retrieves all orders, with optional filtering. Returns Iterator["Order"]
. Use itertools.islice
to offset and limit the results.
Parameter | Description |
---|---|
workspace_id | Optional[str] The workspace ID. Use to get jobs from a specific workspace. Otherwise, jobs from the entire account will be returned. |
order_type | Optional[OrderType] The type of orders to return. To get orders of all types, omit the parameter. |
status | Optional[List[OrderStatus]] Order statuses. Use to search for orders with any of the provided statuses. |
sub_status | Optional[List[OrderSubStatus]] Order sub-statuses. Use to search for orders with any of the provided sub-statuses. |
display_name | Optional[str] Additional search terms. Use to search for orders that contain the provided search query in their name. |
tags | Optional[List[str]] A list of tags that categorize the order. |
sort_by | Optional[utils.SortingField] The results sorting method that arranges elements in ascending or descending order based on a chosen field. To view the list of possible values, see |
from itertools import islice
# Search for ordersorders = up42.Order.all( order_type="TASKING", status=["FULFILLED", "PLACED"], sort_by=up42.OrderSorting.status.asc,)
# Define outputfor order in islice(orders, 0, 5): # Print first 5 results print(f"- Order ID: {order.id}") print(f" Display name: {order.display_name}") print(f" Status: {order.status}") print(f" Type: {order.type}") print(f" Data product ID: {order.data_product_id}") print(f" Order tags: {', '.join(order.tags) if order.tags else 'No tags'}\n")
3.0.0
. Use the search method. Retrieves assets from orders that have FULFILLED
or BEING_FULFILLED
statuses. Returns List[asset.Asset]
.
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Fetch order assetsorder = up42.Order.get(order_id=order_id)order.get_assets()
Tracks the order status by retrying until the status changes to FULFILLED
or FAILED_PERMANENTLY
. It will query the order every 120 seconds.
Parameter | Description |
---|---|
report_time | float An interval between queries, in seconds. The default value is |
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Track statusorder = up42.Order.get(order_id=order_id)order.track(report_time=150)
3.0.0
. Use the track method. Tracks the order status by retrying until the status changes to FULFILLED
or FAILED_PERMANENTLY
. It will query the order every 120 seconds. Returns str
.
Parameter | Description |
---|---|
report_time | float An interval between queries, in seconds. The default value is |
# Select an orderorder_id = "3bf00b63-7188-4b04-aa27-d78e4cd32c01"
# Track statusorder = up42.initialize_order(order_id=order_id)order.track_status(report_time=150)