Catalog class

Create and manage catalog orders using the SDK.


Overview

The Catalog class enables access to the UP42 catalog functionality.

Python

    catalog = up42.initialize_catalog()

  

This class also inherits functions from the CatalogBase class.

Full scenes

construct_search_parameters()

The construct_search_parameters() function allows you to fill out search parameters when searching for catalog imagery. The returned data type is dict.

ArgumentOverview
geometryUnion[FeatureCollection, Feature, dict, list, GeoDataFrame, Polygon] / required
The geometry of interest.
collectionslist[str] / required
The geospatial collection names.
start_datestr
The start date of the search period in the YYYY-MM-DD format. The default value is 2020-01-01.
end_datestr
The end date of the search period in the YYYY-MM-DD format. The default value is 2020-01-30.
limitint
The number of full scenes on a results page. The maximum value is 500. The default value is 10.
max_cloudcoverint
The maximum cloud coverage, in percentage.
An example with construct_search_parameters()

Python

    catalog.construct_search_parameters(
    geometry=up42.get_example_aoi(location="Berlin"),
    collections=["phr"],
    start_date="2022-06-01",
    end_date="2022-12-31",
    limit=20,
    max_cloudcover=25,
)

  

The search() function returns the full scenes matching the search parameters. The returned data type is Union[GeoDataFrame, dict].

ArgumentOverview
search_parametersdict / required
The catalog search parameters.
as_dataframebool
Determines how to return search results:
  • True: return GeoDataFrame.
  • False: return JSON.
The default value is True.
An example with search()

Python

    catalog.search(
    search_parameters=catalog.construct_search_parameters(
        geometry=up42.get_example_aoi(),
        collections=["phr"],
        start_date="2022-06-01",
        end_date="2022-12-31",
        limit=20,
        max_cloudcover=25,
    ),
    as_dataframe=False,
)

  

download_quicklooks()

The download_quicklooks() function allows you to download low-resolution previews of full scenes returned in search results. The returned data type is list[str].

ArgumentOverview
image_idslist[str] / required
The scene IDs.
collectionstr / required
The geospatial collection name.
output_directoryUnion[str, Path, None]
The file output directory. The default value is the current directory.
An example with download_quicklooks()

Python

    catalog.download_quicklooks(
    image_ids=["a4c9e729-1b62-43be-82e4-4e02c31963dd"],
    collection="phr",
    output_directory="/Users/max.mustermann/Desktop/",
)

  

Orders

construct_order_parameters()

The construct_order_parameters() function allows you to fill out an order form for a new catalog order. The returned data type is dict.

ArgumentOverview
data_product_idstr / required
The data product ID.
image_idstr / required
The scene ID.
aoiUnion[dict, Feature, FeatureCollection, list, GeoDataFrame, Polygon]
The order AOI.
tagslist[str]
A list of tags that categorize the order.
An example with construct_order_parameters()

Python

    catalog.construct_order_parameters(
    data_product_id="647780db-5a06-4b61-b525-577a8b68bb54",
    image_id="a4c9e729-1b62-43be-82e4-4e02c31963dd",
    aoi="/Users/max.mustermann/Desktop/aoi.geojson",
    tags=["project-7", "optical"],
)

  

estimate_order()

The estimate_order() function returns the cost estimate for a catalog order. The returned data type is int.

ArgumentOverview
order_parametersUnion[dict, None] / required
Parameters with which to place an order.
An example with estimate_order()

Python

    catalog.estimate_order(
    order_parameters=catalog.construct_order_parameters(
        data_product_id="4f1b2f62-98df-4c74-81f4-5dce45deee99",
        image_id="a4c9e729-1b62-43be-82e4-4e02c31963dd",
        aoi="/Users/max.mustermann/Desktop/aoi.geojson",
    ),
)

  

View repository