This guide is intended to showcase how you can order an image into UP42 Storage and download it to inspect the result, all with the convenience of the UP42 Python SDK!
import up42
up42.authenticate(project_id="12345", project_api_key="12345")
#up42.authenticate(cfg_file="config.json")
catalog = up42.initialize_catalog()
#aoi = up42.read_vector_file("data/aoi_washington.geojson", as_dataframe=False)
aoi = up42.get_example_aoi(location="Berlin", as_dataframe=True)
aoi
search_parameters = catalog.construct_parameters(geometry=aoi,
start_date="2018-01-01",
end_date="2020-12-31",
sensors=["pleiades"],
max_cloudcover=5,
sortby="cloudCoverage",
limit=1)
# Select only immediately available images
# Use {"in": ["MINUTES", "HOURS"]} for archive data
search_parameters["query"]["deliveryTime"] = {"in": ["MINUTES"]}
search_results = catalog.search(search_parameters=search_parameters)
search_results
catalog.estimate_order(aoi, search_results.loc[0])
order = catalog.place_order(aoi, search_results.loc[0])
order.track_status()
assets = order.get_assets()
assets[0].download()
storage = up42.initialize_storage()
assets = storage.get_assets()
assets