Releases: clcr/pyeo
IMPRESS Version
This is the version of PyEO developed for the FAO IMPRESS Project (July, 2023).
ForestMind Extensions
This release includes features added for project work studying corporate social responsibility in terms of supply chain links from point of sale back to the behaviour of originating farms producing primary product. It focussed on Sentinel-2 tiles within Guatemala and Mato Grosso in Brazil.
API redirect hotfix
A quick implementation of a basic native REST query for the Copernicus hub; this is in place due to a breaking change in the Copernicus API, and will be kept for agility in this situation in the future. Some features intended for the next release are also included.
Major changes
- Sentinel-2 queries at present do not depend on the Synergise SentinelHub module; they are instead using a REST query system implemented from using Requests in queries_and_downloads.py.
- This system is not presently paginated and thus cannot return more than 10 results per query.
- Once SentinelHub is updated, this will be moved back into place and the local REST query will be kept in reserve
- A new script,
preprocess_and_stack.py
, is provided; this preprocesses and stacks already downloaded L1 and L2 images. - A function,
download_s2_pairs
for downloading missing pairs of l1 and l2 data is now provided inqueries_and_downloads.py
- A function,
align_image_in_place
, for performing fine alignment (NO resampling) of images is now provided inraster_manipulation.py
Minor changes
- replaces
gdal import
withfrom osgeo import gdal
as per the warning in the latest version of Gdal pixel_bounds_from_polygon
can now take a wkt string as the polygon argumentget_l1/l2_safe_file
will now return None if the file is not foundfilter_by_class_map
now has an option to invert the map, to exclude classes- Due to issues on certain distribution of iOS, the Windows compatibility patch is now also applied with iOS.
Windows compatability, Landsat downloading and restructure
Major updates
- Windows compatibility. A compatibility module replaces GetVirtualMemArray with an equivalent function. This is still under testing; please report any strange behavior in the issue tracker.
- Landsat downloading. Functions to query and download Landsat_8_C1 data from USGS are now in queries_and_downloads.
- API update. Pyeo has now been split into individual modules for querying and downloading, raster processing, filesystem manipulation and image classification. All functions that were in pyeo.core are now in one of these modules.
Minor updates
- Validation. A module for implementing Olofsson's validation method (https://dx.doi.org/10.1016/j.rse.2014.02.2015)
- Numerous small additions - see the documentation
Ongoing development
- Implementations of terrain and cloud correction algorithms for Landsat and Sentinel-2
Restrucutre and conda release
A pre-release for the restructure and a test for the conda build
L2 downloading
The major change in this release is that you can now skip Sen2Cor entirely.
ESA now offer level 2A products for download.
To take advantage of this, you can filter the output from check_for_s2_data_by_date()
using the new function filter_non_matching_s2_data
. This will remove from your query any L1 product that does not have a matching L2 product and vice-versa. In addition, download_s2_data will now download L1 and L2 .SAFE files to the appropriate directories, specified in the function call.
Example of use:
import pyeo.core as pyeo
query_results = pyeo.check_for_s2_data_by_date(aoi_path, start_date, end_date....)
filtered_query = pyeo.filter_non_matching_s2_data(query_results)
pyeo.download_s2_data(filtered_query, l1_dir, l2_dir)
This is already integrated into rolling_composite_s2_change_detection.py
v0.5
Major updates:
- FILE NAMING CONVENTION CHANGED
- Merged files are now of the form [safe_file_name].tif
- Stacked images are now of the form [granule_id][old_image_timestamp][new_image_timestamp].tif
- Classification and probability maps are now of the form [class/prob]_[granule_id][old_image_timestamp]_[new_image_timestamp].tif
- stack_old_and_new_images now stacks by granule, not by overlap.
- apply_sen2cor now checks for successful completion of atmospheric correction before deleting L1 data
- There is now a suite of real test data, under pyeo/tests. An archive of test data will be available on git LFS before too long. To run, use the command pytest real_data_tests; see real_data_tests for more info
- classify_image now skips pixels that include nodata values
v0.4-beta
First working release
This release contains all needed code to produce models and change maps from Sentinel 2