#!/usr/bin/env python # coding: utf-8 # # Catalog Search # # Check data availability & download image preview quicklooks via the catalog search. You can filter by various parameters e.g. time period, area of interest, cloud cover etc. # In[ ]: import up42 up42.authenticate(project_id="your project ID", project_api_key="your-project-API-key") catalog = up42.initialize_catalog() # ## See available data collections # # Filter on the "name" key to see the available collections. # In[ ]: collections = catalog.get_collections() [c["name"] for c in collections] # ## Search available scenes in 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="2022-12-31", collections=["phr"], max_cloudcover=20, sortby="cloudCoverage", limit=5) search_results = catalog.search(search_parameters=search_parameters) display(search_results.head()) # In[ ]: catalog.plot_coverage(scenes=search_results, aoi=aoi, legend_column="sceneId") # ## Download & Visualize quicklooks # In[ ]: catalog.download_quicklooks(image_ids=search_results.id.to_list(), sensor="pleiades") # In[ ]: catalog.map_quicklooks(scenes=search_results, aoi=aoi) # In[ ]: