Landsat harmonization tool using GEE
Project description
🌍 LEOHS: Landsat Earth Observation Harmonization Script
LEOHS is a Python package for harmonizing Landsat imagery across sensors (e.g., Landsat 7 and 8) using Google Earth Engine (GEE). It is designed specifically to create harmonization functions optimized for user-defined study areas, time periods, and sampling parameters.
🔧 Requirements
- Python 3.10 — LEOHS must be run in its own environment
- an active Google Earth Engine account
- an area of interest shapefile
📦 Installation
1. Create a clean Python 3.10 environment (recommended name: leohs_env)
conda create -n leohs_env python=3.10 -y
conda activate leohs_env
2. Install LEOHS
pip install leohs
🚀 Example Usage
import leohs
leohs.run_leohs(
Aoi_shp_path=r"E:\Austria.shp",
Save_folder_path=r"E:\Austria_testing",
SR_or_TOA="SR",
months=[6,7,8],
years=[2017],
sample_points_n=100000)
🔧 run_leohs Parameters
-
Aoi_shp_path(str):
Path to your input AOI shapefile (must be in WGS84). -
Save_folder_path(str):
Path to the output folder where results will be saved. -
SR_or_TOA(str):
Type of Landsat imagery to process. Choose"SR"or"TOA". -
months(list of int):
List of months to include in image filtering (e.g.,[1,2,3,4,5,6,7,8,9,10,11,12]). -
years(list of int):
List of years to include in filtering (e.g.,[2013,2014,2015,2016,2017,2018,2019,2020,2021,2022]). -
sample_points_n(int):
Number of sample points to generate (e.g.,100000). Max: 1,000,000. -
maxCloudCover(int, optional, default=50):
Maximum cloud cover (%) for image filtering. -
Regression_types(list of str, optional, default=["OLS"]):
List of regression models to run. Valid values:"OLS","RMA","TS". -
CFMask_filtering(bool, optional, default=True):
Whether to apply CFMask filtering (cloud, water, snow masking). -
Water(bool, optional, default=True):
Allow water pixels (only effective ifCFMask_filtering=True). -
Snow(bool, optional, default=True):
Allow snow pixels (only effective ifCFMask_filtering=True).
🛰️ Outputs
The following files are exported to the specified Save_folder_path:
-
Text log (
TOA_LEOHS_harmonization.txt):
Contains regression equations for each band, processing time, and diagnostic logs. -
Heatmaps (
.pngfiles):
Visualizations of pixel distributions between Landsat 7 and 8 for each band. -
Sample point shapefile (
.shp,.dbf,.shx, etc.):
Contains the sampled locations and their associated pixel values. -
Pixel and pair data (
.csv):- Sampled pixel values for all matched images
- Image pair metadata (e.g., dates, paths, overlap score)
📑 License
This project is licensed under the
GNU General Public License v3.0 or later (GPL-3.0-or-later)
© 2025 Galen Richardson
See the full license text in the LICENSE file or at gnu.org/licenses/gpl-3.0.
📬 Contact
Author: Galen Richardson
Email: galenrichardsonam@gmail.com
Feel free to reach out for questions, bug reports, suggestions, or collaboration ideas.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file leohs-0.1.1.tar.gz.
File metadata
- Download URL: leohs-0.1.1.tar.gz
- Upload date:
- Size: 8.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08c079edb867efd46a3e7f1253c9fc2eeaf73d4b3e00f75af1b445a20ab9bc13
|
|
| MD5 |
ce97a28e3aa518c9cb84be6053ea47d2
|
|
| BLAKE2b-256 |
dc0a2fdebfe126e2a6e5a991e363375b4a53e4a7765efaca8306e775dd982264
|
File details
Details for the file leohs-0.1.1-py3-none-any.whl.
File metadata
- Download URL: leohs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb8dcfe75b76087e4e7bb813123435f58ef72d7f25f2f3e1cfa45187d45ff13a
|
|
| MD5 |
de38b117aafff58f5ff145ef40838ed2
|
|
| BLAKE2b-256 |
d61fd0a2ec26d013f6d30f430a8f7aab7d3b8507773a0b165807c895d2adf308
|