The CatalogBase class is inherited by the Tasking and Catalog classes. To use its functions, first initialize the Tasking or Catalog class as follows:
Python
tasking = up42.initialize_tasking()
catalog = up42.initialize_catalog()
The get_data_product_schema
method returns the parameters needed to place an order for a specific data product.
The returned data type is dict
.
Argument | Overview |
---|---|
data_product_id | str / required The data product ID. |
Examples with get_data_product_schema()
Python
tasking.get_data_product_schema(data_product_id="123eabab-0511-4f36-883a-80928716c3db")
catalog.get_data_product_schema(data_product_id="647780db-5a06-4b61-b525-577a8b68bb54")
The place_order
method allows you to place a catalog or tasking order.
The returned data type is Order
.
Argument | Overview |
---|---|
order_parameters | Union[dict, None] Parameters with which to place an order. |
track_status | bool Determines when to return order data:
False . |
report_time | int Use if track_status=True .The time interval for querying whether the order status has changed to FULFILLED or FAILED , in seconds. The default value is 120 . |
Examples with place_order()
Python
# Specify order geometry
geometry = {
"type": "Polygon",
"coordinates": (
(
(13.375966, 52.515068),
(13.375966, 52.516639),
(13.378314, 52.516639),
(13.378314, 52.515068),
(13.375966, 52.515068),
),
),
}
# Place a tasking order
tasking_order_parameters = tasking.construct_order_parameters(
data_product_id="123eabab-0511-4f36-883a-80928716c3db",
name="PNeo tasking order",
acquisition_start="2023-11-01",
acquisition_end="2023-12-20",
aoi=geometry,
tags=["project-7", "optical"],
)
tasking.place_order(
order_parameters=tasking_order_parameters,
track_status=True,
report_time=150,
)
# Place a catalog order
catalog_order_parameters = catalog.construct_order_parameters(
data_product_id="4f1b2f62-98df-4c74-81f4-5dce45deee99",
image_id="a4c9e729-1b62-43be-82e4-4e02c31963dd",
aoi=geometry,
)
catalog.place_order(
order_parameters=catalog_order_parameters,
track_status=True,
report_time=150,
)