The Catalog class enables access to the UP42 catalog functionality.
Python
catalog = up42.initialize_catalog()
This class also inherits functions from the CatalogBase class.
The construct_search_parameters()
function allows you to fill out search parameters when searching for catalog imagery. The returned data type is dict
.
Argument | Overview |
---|---|
geometry | Union[FeatureCollection, Feature, dict, list, GeoDataFrame, Polygon] / required The geometry of interest. |
collections | list[str] / required The geospatial collection names. |
start_date | str The start date of the search period in the YYYY-MM-DD format. The default value is 2020-01-01 . |
end_date | str The end date of the search period in the YYYY-MM-DD format. The default value is 2020-01-30 . |
limit | int The number of full scenes on a results page. The maximum value is 500 . The default value is 10 . |
max_cloudcover | int 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]
.
Argument | Overview |
---|---|
search_parameters | dict / required The catalog search parameters. |
as_dataframe | bool Determines how to return search results:
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,
)
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]
.
Argument | Overview |
---|---|
image_ids | list[str] / required The scene IDs. |
collection | str / required The geospatial collection name. |
output_directory | Union[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/",
)
The construct_order_parameters()
function allows you to fill out an order form for a new catalog order. The returned data type is dict
.
Argument | Overview |
---|---|
data_product_id | str / required The data product ID. |
image_id | str / required The scene ID. |
aoi | Union[dict, Feature, FeatureCollection, list, GeoDataFrame, Polygon] The order AOI. |
tags | list[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"],
)
The estimate_order()
function returns the cost estimate for a catalog order. The returned data type is int
.
Argument | Overview |
---|---|
order_parameters | Union[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",
),
)