Get archive geospatial data from a particular date range in the past.
A shared class for tasking and catalog functionalities.
Functions
Retrieves the parameters needed to create an order for a specific data product. Returns dict
.
Parameter | Description |
---|---|
data_product_id | str The data product ID. |
Python
tasking = up42.initialize_tasking()
catalog = up42.initialize_catalog()
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")
Estimates the cost of an order, in UP42 credits. Returns int
.
Parameter | Description |
---|---|
order_parameters | order.OrderParams Order parameters. |
Python
tasking = up42.initialize_tasking()
catalog = up42.initialize_catalog()
tasking.estimate_order(
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="/Users/max.mustermann/Desktop/aoi.geojson",
tags=["project-7", "optical"],
),
)
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",
),
)
Creates a catalog or tasking order. Returns order.Order
.
Parameter | Description |
---|---|
order_parameters | order.OrderParams Order parameters. |
track_status | bool Determines when to return order data:
False . |
report_time | float Use if track_status=True .An interval between queries, in seconds. The default value is 120 . |
Python
tasking = up42.initialize_tasking()
catalog = up42.initialize_catalog()
# Tasking
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="/Users/max.mustermann/Desktop/aoi.geojson",
tags=["project-7", "optical"],
)
tasking.place_order(
order_parameters=tasking_order_parameters,
track_status=True,
report_time=150,
)
# Catalog
catalog_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",
)
catalog.place_order(
order_parameters=catalog_order_parameters,
track_status=True,
report_time=150,
)
A class that enables access to the catalog functionality. This class also inherits functions from the CatalogBase class.
Functions
Constructs search parameters. Returns dict
.
Parameter | Description |
---|---|
geometry | Geometry The geometry of interest. |
collections | List[str] 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 . |
max_cloudcover | Optional[int] The maximum cloud coverage, in percentage. |
Python
catalog = up42.initialize_catalog()
catalog.construct_search_parameters(
geometry=up42.get_example_aoi(),
collections=["phr"],
start_date="2022-06-01",
end_date="2022-12-31",
max_cloudcover=25,
)
Retrieves the full scenes matching the search parameters. Returns Union[geopandas.GeoDataFrame, dict]
.
Parameter | Description |
---|---|
search_parameters | dict Search parameters. |
as_dataframe | bool Determines how to return search results:
True . |
Python
catalog = up42.initialize_catalog()
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",
max_cloudcover=25,
),
as_dataframe=False,
)
Constructs an order form for a specific data product. Returns order.OrderParams
.
Parameter | Description |
---|---|
data_product_id | str The data product ID. |
image_id | str The scene ID. |
aoi | Optional[Geometry] The order geometry. |
tags | Optional[List[str]] A list of tags that categorize the order. |
Python
catalog = up42.initialize_catalog()
order_params = 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"],
)
# To name orders, you can add a `displayName` attribute to the parameters.
order_params["params"]["displayName"] = "My catalog order"
Downloads quicklooks, that is, low-resolution previews of full scenes returned in search results. Returns List[str]
.
Parameter | Description |
---|---|
image_ids | List[str] The scene IDs. |
collection | str The geospatial collection name. |
output_directory | Union[str, pathlib.Path, None] The file output directory. The default value is the current directory. |
Python
catalog = up42.initialize_catalog()
catalog.download_quicklooks(
image_ids=["a4c9e729-1b62-43be-82e4-4e02c31963dd"],
collection="phr",
output_directory="/Users/max.mustermann/Desktop/",
)