Order new or archive geospatial data.
View repositoryConstants
Constant | Description | Value |
---|---|---|
UnitType | The type of unit. | Literal["SQ_KM", "SCENE"] |
A data class that represents errors encountered during order cost estimation or creation.
Attributes
Attribute | Description |
---|---|
index | int The failed geometry index number. |
message | str The error message associated with the failed geometry. |
details | str Error message details. |
A data class that represents references to orders in the system.
Attributes
Attribute | Description |
---|---|
index | int A sequence identifier for the order reference. |
id | str The order ID. |
Properties
Retrieves the full details of the order associated with the reference.
Python
from up42.order_template import OrderReference
# Select an order
order_id = "68567134-27ad-7bd7-4b65-d61adb11fc78"
# Create an OrderReference instance for the given order and access order details
order_ref = OrderReference(index=0, id=order_id)
full_order = order_ref.order
# Define output
print(f"Display name: {getattr(full_order, 'display_name', 'N/A')}")
print(f"Status: {full_order.status}")
# print(f"Substatus: {full_order.details.sub_status}") # for tasking orders
# print(f"Acquisition start date: {full_order.details.acquisition_start}") # for tasking orders
# print(f"Acquisition end date: {full_order.details.acquisition_end}") # for tasking orders
# print(f"Order description: {full_order.details.extra_description}") # for tasking orders
# print(f"Geometry: {full_order.details.geometry}") # for tasking orders
tags = getattr(full_order, "tags", [])
print("Tags:", ", ".join(tags) if tags else "No tags")
A data class that represents the cost details of an order.
Attributes
Attribute | Description |
---|---|
index | int The geometry index number. Indexing starts from zero. |
credits | float The estimated cost of the geometry, in credits. |
size | float The size of the geometry. |
unit | UnitType The unit of measurement used to calculate the size. |
A data class that represents the estimated cost of a tasking or catalog order batch.
Attributes
Attribute | Description |
---|---|
items | list[Union[OrderCost, OrderError]] A list of geometries in the estimation. It might include successful cost details ( OrderCost ) or errors encountered during the estimation (OrderError ). |
credits | float The estimate of the order batch cost, in credits. |
size | float The size of the order batch in square kilometers or the number of scenes needed to cover the requested geometry. |
unit | UnitType The unit of measurement used to calculate the size. |
Python
# Define order geometry
geometry = {
"type": "Polygon",
"coordinates": [[
[13.369713, 52.452327],
[13.369713, 52.470760],
[13.339159, 52.470760],
[13.339159, 52.452327],
[13.369713, 52.452327]
]]
}
# Wrap the geometry into a GeoJSON FeatureCollection
features = geojson.FeatureCollection(features=[geojson.Feature(geometry=geometry)])
# Instantiate a BatchOrderTemplate with the given parameters
order_template = up42.BatchOrderTemplate(
data_product_id="c3de9ed8-f6e5-4bb5-a157-f6430ba756da",
display_name="Sentinel-2 over Berlin",
features=features,
params={
"id": "S2B_T32UQD_20250520T102551_L2A"
},
tags=["sentinel-berlin"]
)
# Estimate the cost
estimate = order_template.estimate
# Define output
print(f"Total credits: {estimate.credits}")
print(f"Total size: {estimate.size} {estimate.unit}")
print("Geometry items:")
for item in estimate.items:
print(f" - Index: {item.index}")
print(f" Credits: {item.credits}")
print(f" Size: {item.size} {item.unit}")
A data class that defines a template for creating and estimating batch orders.
Attributes
Attribute | Description |
---|---|
data_product_id | str The data product ID. |
display_name | str A human-readable name that describes the order. |
tags | list[str] A list of tags that categorize the order. A tag can consist of letters, numbers, spaces, and special characters ( . , - , _ , / , : ). If the list is empty, tags will be removed. |
features | geojson.FeatureCollection A GeoJSON FeatureCollection representing the order’s geometry. |
params | dict Order parameters. To retrieve the required and optional parameters needed to create an order for a specific data product, use DataProduct.schema. |
Python
# Define order geometry
geometry = {
"type": "Polygon",
"coordinates": [[
[13.369713, 52.452327],
[13.369713, 52.470760],
[13.339159, 52.470760],
[13.339159, 52.452327],
[13.369713, 52.452327]
]]
}
# Wrap the geometry into a GeoJSON FeatureCollection
features = geojson.FeatureCollection(features=[geojson.Feature(geometry=geometry)])
# Instantiate a BatchOrderTemplate with the given parameters
order_template = up42.BatchOrderTemplate(
data_product_id="c3de9ed8-f6e5-4bb5-a157-f6430ba756da",
display_name="Sentinel-2 over Berlin",
features=features,
params={
"id": "S2B_T32UQD_20250520T102551_L2A"
},
tags=["sentinel-berlin"]
)
Methods
Submits a batch order. Returns list[Union[OrderReference, OrderError]]
.
Python
# Define order geometry
geometry = {
"type": "Polygon",
"coordinates": [[
[13.369713, 52.452327],
[13.369713, 52.470760],
[13.339159, 52.470760],
[13.339159, 52.452327],
[13.369713, 52.452327]
]]
}
# Wrap the geometry into a GeoJSON FeatureCollection
features = geojson.FeatureCollection(features=[geojson.Feature(geometry=geometry)])
# Instantiate a BatchOrderTemplate with the given parameters
order_template = up42.BatchOrderTemplate(
data_product_id="c3de9ed8-f6e5-4bb5-a157-f6430ba756da",
display_name="Sentinel-2 over Berlin",
features=features,
params={
"id": "S2B_T32UQD_20250520T102551_L2A"
},
tags=["sentinel-berlin"]
)
order_template.place