Comments (1)
This might not be the most efficient method, but I am in a similar situation as I want to download the image with the least amount of cloud cover. Once I find all images with the API search that are in the path/row region of interested I am interested I use the metadata from the search to decide which one to select for download. I save the search to a list and then removed from the list based on my criteria and the metadata provided.
For example the metadata I get some a search is below. This is one scene's meta data. I then use the cloud_cover attribute in this list and sort then grab the smallest value. I recommend printing to the console all of the elements and looking for the attribute ID you want to use to pick your scenes. Hope this helps a bit.
{'cloud_cover': 19, 'entity_id': 'LC80290202020197LGN01', 'display_id': 'LC08_L1TP_029020_20200715_20210330_02_T1', 'ordering_id': 'None', 'landsat_product_id': 'LC08_L1TP_029020_20200715_20210330_02_T1', 'landsat_scene_id': 'LC80290202020197LGN01', 'acquisition_date': datetime.datetime(2020, 7, 15, 0, 0), 'collection_category': datetime.datetime(2023, 2, 1, 0, 0), 'collection_number': 2, 'wrs_path': 29, 'wrs_row': 20, 'nadir-off_nadir': 'NADIR', 'roll_angle': 0.0, 'date_product_generated': datetime.datetime(2021, 3, 30, 0, 0), 'land_cloud_cover': 40.74, 'scene_cloud_cover': 19.22, 'start_time': datetime.datetime(2020, 7, 15, 17, 7, 24, 634020), 'stop_time': datetime.datetime(2020, 7, 15, 17, 7, 56, 404020), 'station_id': 'LGN', 'day-night_indicator': 'DAY', 'ground_control_points_model': 347, 'ground_control_points_version': 5, 'geometric_rmse_model': 7.325, 'geometric_rmse_model_x': 5.505, 'geometric_rmse_model_y': 4.833, 'image_quality': 9, 'processing_software_version': 'LPGS_15.4.0', 'sun_elevation_l0ra': 52.30272974, 'sun_azimuth_l0ra': 155.9665622, 'tirs_ssm_model': 'FINAL', 'data_type': 'OLI_TIRS_L1TP', 'sensor_id': 'OLI_TIRS', 'satellite': 8, 'panchromatic_lines': 16021, 'panchromatic_samples': 15841, 'reflective_lines': 8011, 'reflective_samples': 7921, 'thermal_lines': 8011, 'thermal_samples': 7921, 'product_map_projection': 'UTM', 'utm_zone': 15, 'datum': 'WGS84', 'ellipsoid': 'WGS84', 'grid_cell_size_panchromatic': 15.0, 'grid_cell_size_reflective': 30.0, 'grid_cell_size_thermal': 30.0, 'bias_parameter_file_name_oli': 'LO8BPF20200715151302_20200715171921.01', 'bias_parameter_file_name_tirs': 'LT8BPF20200705192819_20200719110031.01', 'calibration_parameter_file': 'LC08CPF_20200701_20200930_02.04', 'rlut_file_name': 'LC08RLUT_20150303_20431231_02_01.h5', 'scene_center_latitude': 57.30975, 'scene_center_longitude': -90.91495, 'corner_upper_left_latitude': 58.40134, 'corner_upper_left_longitude': -92.88536, 'corner_upper_right_latitude': 58.33333, 'corner_upper_right_longitude': -88.82648, 'corner_lower_left_latitude': 56.24272, 'corner_lower_left_longitude': -92.89189, 'corner_lower_right_latitude': 56.18009, 'corner_lower_right_longitude': -89.06342, 'has_customized_metadata': None, 'options': {'bulk': True, 'download': True, 'order': False, 'secondary': False}, 'selected': {'bulk': False, 'compare': False, 'order': False}, 'spatial_bounds': (-92.89023, 56.20468, -88.87987, 58.39652), 'spatial_coverage': <shapely.geometry.polygon.Polygon object at 0x0000019E49A00C10>, 'temporal_coverage': [datetime.datetime(2020, 7, 15, 0, 0), datetime.datetime(2020, 7, 15, 0, 0)], 'publish_date': datetime.datetime(2022, 6, 22, 18, 27, 47, tzinfo=tzoffset(None, -18000))}
from landsatxplore.
Related Issues (20)
- No product available for Landsat 9 after September 2022 HOT 3
- "EE: login failed." error when downloading files HOT 1
- Make progress bar optional.
- download with landsatxplore HOT 8
- KeyError: 'content-disposition' HOT 2
- Downloading image by row and path HOT 1
- Download is not available HOT 1
- it seems that the function 'Earth_Down = EarthExplorer(username, password)' does not work HOT 3
- Update download ID keys for Landsat 8/9
- KeyError: 'content-disposition' when trying to download HOT 2
- Download the single band file only for each scene, not the whole scene bundle file.
- Why the max download is only 100 products HOT 1
- api.search() not returning level 2 products HOT 4
- Download is not available HOT 10
- landsatxplore.errors.USGSError: DATASET_AUTH: Dataset status is unavailable to this user HOT 6
- how to download single or several bands instead of whole bands and metadata? HOT 3
- EarthExplorer() function does not work HOT 4
- Error When Downloading: Unable to find product configuration HOT 2
- Error raised but scene was successfully downloaded for Landsat 8
- Error when downloading: None of the archived ids succeeded! Update necessary! HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from landsatxplore.