You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the code max_cloud_cover=95 to be max_cloud_cover=self.settings['cloud_thresh']
for roi_id in tqdm(selected_ids, desc="Processing", leave=False):
polygon = common.get_roi_polygon(self.rois.gdf, roi_id)
if polygon is None:
raise Exception(f"ROI ID {roi_id} not found in the ROIs GeoDataFrame")
if polygon:
# only get the imagery in tier 1
images_count = count_images_in_ee_collection(
polygon,
start_date,
end_date,
satellites=set(self.settings["sat_list"]),
max_cloud_cover=95,
tiers=[1],
months_list=months_list,
)
satellite_messages = [f"\nROI ID: {roi_id}"]
for sat in self.settings["sat_list"]:
satellite_messages.append(f"{sat}: {images_count[sat]} images")
print("\n".join(satellite_messages))
Solution
max_cloud_cover = self.settings.get("cloud_thresh", 95)
# convert the max cloud cover to a percentage if it is a fraction
if max_cloud_cover<1 and max_cloud_cover >=0:
max_cloud_cover = max_cloud_cover * 100
# only get the imagery in tier 1
images_count = count_images_in_ee_collection(
polygon,
start_date,
end_date,
satellites=set(self.settings["sat_list"]),
max_cloud_cover=max_cloud_cover,
tiers=[1],
months_list=months_list,
)
The text was updated successfully, but these errors were encountered:
2320sharon
changed the title
Update preview_available_images to uses the max cloud cover in the user's settings
Update preview_available_images to use the cloud_thresh in the user's settings
Jul 18, 2024
I just realized why we don't do this. The cloud thresh controls the cloud cover in the individual image, which is not the same as the max cloud cover property in GEE that is the cloud cover for the entire scene beyond just the ROI. This will not work.
Update the code
max_cloud_cover=95
to bemax_cloud_cover=self.settings['cloud_thresh']
Solution
The text was updated successfully, but these errors were encountered: