remotior_sensus.tools.download_products module
Download products.
This tool allows for downloading products such as Landsat and Sentinel-2 datasets.
- remotior_sensus.tools.download_products.delete_copernicus_token(access_token, session_state, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None)
- remotior_sensus.tools.download_products.download(product_table, output_path, exporter=False, band_list=None, virtual_download=False, extent_coordinate_list=None, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None, authentication_uri=None, nasa_user=None, nasa_password=None, copernicus_user=None, copernicus_password=None, progress_message=True, ignore_errors=False) OutputManager
Download products.
This tool downloads product. Downloads Sentinel-2 images using the following Google service: https://storage.googleapis.com/gcp-public-data-sentinel-2 or https://catalogue.dataspace.copernicus.eu if copernicus_user and copernicus_password are provided.
Downloads HLS images from: https://cmr.earthdata.nasa.gov/search/site/search_api_docs.html.
- Parameters:
product_table – product table object.
output_path – string of output path.
exporter – if True, export download urls.
band_list – list of band numbers to be downloaded.
virtual_download – if True create a virtual raster of the linked image.
extent_coordinate_list – list of coordinates for defining a subset region [left, top, right, bottom] .
proxy_host – proxy host.
proxy_port – proxy port.
proxy_user – proxy user.
proxy_password – proxy password.
authentication_uri – authentication uri.
nasa_user – user for NASA authentication.
nasa_password – password for NASA authentication.
copernicus_user – user for Copernicus authentication.
copernicus_password – password for Copernicus authentication.
progress_message – progress message.
ignore_errors – if True, ignore download errors and continue with the next product download.
- Returns:
- object
OutputManager()
with paths = output file list
extra={‘directory_paths’: list of output directory paths}
- object
- remotior_sensus.tools.download_products.export_product_table_as_xml(product_table, output_path=None)
Exports product table as xml.
Exports a product table and attributes.
- remotior_sensus.tools.download_products.get_copernicus_token(user, password, authentication_uri=None, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None)
- remotior_sensus.tools.download_products.import_as_xml(xml_path)
Imports a product table as xml.
Imports a product table and attributes.
- remotior_sensus.tools.download_products.product_names() list
Prints the products that can be searched and returns the list.
- remotior_sensus.tools.download_products.query_aster_l1t_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of ASTER from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_cop_dem_glo_30_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of MODIS temperature from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_landsat_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of Landsat from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_modis_09q1_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of MODIS from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_modis_11a2_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of MODIS temperature from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_nasa_cmr(product, date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of NASA CMR.
This tool performs the query of NASA CMR Search https://cmr.earthdata.nasa.gov/search/site/search_api_docs.html.
- Parameters:
product
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_sentinel2_mpc(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of Sentinel-2 from Microsoft Planetary Computer.
This tool performs the query from Microsoft Planetary Computer https://planetarycomputer.microsoft.com.
- Parameters:
date_from – date defining the starting period of the query
date_to
max_cloud_cover
result_number
name_filter
coordinate_list
progress_message
proxy_host
proxy_port
proxy_user
proxy_password
- Returns:
object OutputManger
- remotior_sensus.tools.download_products.query_sentinel_2_database(date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, copernicus_user=None, copernicus_password=None, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None) OutputManager
Perform the query of Sentinel-2 database.
This tool performs the query of Sentinel-2 database.
Query using Copernicus Data Space Ecosystem API https://documentation.dataspace.copernicus.eu/#/APIs/OData (from https://documentation.dataspace.copernicus.eu: ‘Copernicus Data Space Ecosystem represents an overall and comprehensive data ecosystem accessible via web portal, applications and APIs. … The Copernicus Data Space Ecosystem provides the essential data and service offering for everyone to use, for commercial and non-commercial purposes’).
Sentinel-2 metadata are downloaded through the following Google service: https://storage.googleapis.com/gcp-public-data-sentinel-2 .
- Parameters:
date_from – date defining the starting period of the query.
date_to
max_cloud_cover
result_number
name_filter
coordinate_list – list [left, top, right, bottom] WGS84 coordinates.
progress_message – progress message
copernicus_user
copernicus_password
proxy_host – proxy host.
proxy_port – proxy port.
proxy_user – proxy user.
proxy_password – proxy password.
- Returns:
object
OutputManager()
- remotior_sensus.tools.download_products.search(product, date_from, date_to, max_cloud_cover=100, result_number=50, name_filter=None, coordinate_list=None, progress_message=True, proxy_host=None, proxy_port=None, proxy_user=None, proxy_password=None, copernicus_user=None, copernicus_password=None) OutputManager
Perform the query of image databases.
This tool performs the query of image products, currently Landsat, Sentinel-2, Harmonized Landsat Sentinel-2.
Sentinel-2 data can be searched from multiple sources.
Query using Copernicus Data Space Ecosystem API https://documentation.dataspace.copernicus.eu/#/APIs/OData (from https://documentation.dataspace.copernicus.eu: ‘Copernicus Data Space Ecosystem represents an overall and comprehensive data ecosystem accessible via web portal, applications and APIs. … The Copernicus Data Space Ecosystem provides the essential data and service offering for everyone to use, for commercial and non-commercial purposes’).
Sentinel-2 metadata are downloaded through the following Google service: https://storage.googleapis.com/gcp-public-data-sentinel-2 .
Alternatively, query the collections from Microsoft Planetary Computer https://planetarycomputer.microsoft.com
Performs the query of Harmonized Landsat Sentinel-2 through NASA CMR Search https://cmr.earthdata.nasa.gov/search/site/search_api_docs.html.
- Parameters:
product – product name from configurations.product_list
date_from – date defining the starting period of the query.
date_to
max_cloud_cover
result_number
name_filter
coordinate_list – list [left, top, right, bottom] WGS84 coordinates.
progress_message – progress message
copernicus_user
copernicus_password
proxy_host – proxy host.
proxy_port – proxy port.
proxy_user – proxy user.
proxy_password – proxy password.
- Returns:
object
OutputManager()