Ordering

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!

In [ ]:
import up42
up42.authenticate(project_id="12345", project_api_key="12345")
#up42.authenticate(cfg_file="config.json")

catalog = up42.initialize_catalog()

Search available scenes within aoi

In [ ]:
#aoi = up42.read_vector_file("data/aoi_washington.geojson", as_dataframe=False)
aoi = up42.get_example_aoi(location="Berlin", as_dataframe=True)
aoi
In [ ]:
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

Estimate the cost of the order

In [ ]:
catalog.estimate_order(aoi, search_results.loc[0])

Place an order for the image, tracking it's status

In [ ]:
order = catalog.place_order(aoi, search_results.loc[0])
In [ ]:
order.track_status()

Get the assets or results of the order

In [ ]:
assets = order.get_assets()
In [ ]:
assets[0].download()

Get previously ordered assets from UP42 Storage

In [ ]:
storage = up42.initialize_storage()
assets = storage.get_assets()
assets
In [ ]: