CatalogBase class

Choose data offerings from the glossary.


Overview

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()

  

Collections

get_collections()

The get_collections() function returns a list of geospatial collections. The returned data type is Union[Dict, List].

Examples with get_collections()

Python

    tasking.get_collections()

catalog.get_collections()

  

Data products

get_data_products()

The get_data_products() function returns a list of data products. The returned data type is Union[dict, List[dict]].

ArgumentOverview
basicbool
Determines how to return a list of data products:
  • True: return only collection titles, collection names, host names, product configuration titles, and data product IDs.
  • False: return the full response.
The default value is True.
Examples with get_data_products()

Python

    tasking.get_data_products(basic=False)

catalog.get_data_products(basic=False)

  

get_data_product_schema()

The get_data_product_schema() function returns the parameters needed to place an order for a specific data product. The returned data type is dict.

ArgumentOverview
data_product_idstr / 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")

  

Orders

place_order()

The place_order() function allows you to place a catalog or tasking order. The returned data type is Order.

ArgumentOverview
order_parametersUnion[dict, None]
Parameters with which to place an order.
track_statusbool
Determines when to return order data:
  • True: return order data only when the order status changes to FULFILLED or FAILED.
  • False: return order data immediately.
The default value is False.
report_timeint
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",
    geometry=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,
)

  

A button link with the "View repository" text on it