Metadata-Version: 2.4
Name: vhrharmonize
Version: 1.0.0
Summary: Automated open source library to preprocess satellite imagery
Author-email: Kanoa Lindiwe <cankanoa@gmail.com>
Maintainer-email: Joseph Emile Honour Percival <ipercival@gmail.com>
License: MIT
Project-URL: Bug Tracker, https://github.com/cankanoa/vhrharmonize/issues
Project-URL: Source, https://github.com/cankanoa/vhrharmonize
Keywords: Remote sensing,Satellite imagery,Image preprocessing,Orthorectification,Pansharpening,Atmospheric correction,RPC refinement,WorldView,Python automation,Raster processing,Multispectral imagery
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rasterio>=1.4.3
Requires-Dist: numpy>=2.2
Requires-Dist: geopandas>=1.0.1
Requires-Dist: shapely>=2.1
Requires-Dist: pyyaml
Requires-Dist: requests>=2.32.3
Requires-Dist: gdal>=3.11
Requires-Dist: pyproj>=3.7
Requires-Dist: tqdm
Requires-Dist: wcmatch>=10.0
Provides-Extra: cloud
Requires-Dist: omnicloudmask; extra == "cloud"
Requires-Dist: scipy>=1.15; extra == "cloud"
Requires-Dist: imageio; extra == "cloud"
Provides-Extra: py6s
Requires-Dist: Py6S; extra == "py6s"
Provides-Extra: flaash
Requires-Dist: envipyengine>=1.0.9; extra == "flaash"
Provides-Extra: orthorectification
Requires-Dist: orthority>=0.5.1; extra == "orthorectification"
Provides-Extra: pansharpen
Requires-Dist: orthority>=0.5.1; extra == "pansharpen"
Provides-Extra: radiometric-normalization
Requires-Dist: spectralmatch; extra == "radiometric-normalization"
Provides-Extra: align
Requires-Dist: coregix; extra == "align"
Provides-Extra: docs
Requires-Dist: mkdocs<2.0,>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.0.0; extra == "docs"
Requires-Dist: mkdocs-jupyter>=0.24.0; extra == "docs"
Requires-Dist: mkdocstrings>=0.21.0; extra == "docs"
Requires-Dist: mkdocstrings-python>=0.10.0; extra == "docs"
Requires-Dist: mkdocs-git-revision-date-plugin<0.3.3,>=0.3; extra == "docs"
Requires-Dist: pymdown-extensions>=9.10; extra == "docs"
Provides-Extra: defaults
Requires-Dist: omnicloudmask; extra == "defaults"
Requires-Dist: scipy>=1.15; extra == "defaults"
Requires-Dist: imageio; extra == "defaults"
Requires-Dist: requests>=2.32.3; extra == "defaults"
Requires-Dist: Py6S; extra == "defaults"
Requires-Dist: orthority>=0.5.1; extra == "defaults"
Requires-Dist: spectralmatch; extra == "defaults"
Requires-Dist: coregix; extra == "defaults"
Provides-Extra: all
Requires-Dist: omnicloudmask; extra == "all"
Requires-Dist: scipy>=1.15; extra == "all"
Requires-Dist: imageio; extra == "all"
Requires-Dist: requests>=2.32.3; extra == "all"
Requires-Dist: Py6S; extra == "all"
Requires-Dist: envipyengine>=1.0.9; extra == "all"
Requires-Dist: orthority>=0.5.1; extra == "all"
Requires-Dist: spectralmatch; extra == "all"
Requires-Dist: coregix; extra == "all"
Provides-Extra: dask
Requires-Dist: dask; extra == "dask"
Dynamic: license-file

# vhrharmonize: VHR Satellite Imagery Preprocessing Library

![PyPI Version](https://img.shields.io/pypi/v/vhrharmonize)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/vhrharmonize?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=GREEN&left_text=PyPI+Downloads)](https://pepy.tech/projects/vhrharmonize)
[![Your-License-Badge](https://img.shields.io/badge/License-MIT-green)](#)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15311571.svg)](https://doi.org/10.5281/zenodo.15311571)

---

## Overview

`vhrharmonize` is an open-source Python library and CLI suite for preprocessing very high resolution (VHR) satellite imagery into analysis-ready products. Current supported end-to-end workflows: **WorldView-3 B1 imagery**. Additional providers and sensors (for example, Planet) will be added.

---

## Features

- Atmospheric correction workflows ([Py6S](https://github.com/robintw/Py6S) default, [FLAASH](https://github.com/envi-idl/envipyengine) optional backend)
- RPC orthorectification ([Orthority](https://github.com/leftfield-geospatial/orthority))
- Pansharpening ([Orthority](https://github.com/leftfield-geospatial/orthority))
- Optional cloud masking ([OmniCloudMask](https://github.com/DPIRD-DMA/OmniCloudMask))
- Pairwise alignment ([coregix](https://github.com/iosefa/coregix))
- Relative Radiometric Normalization ([spectralmatch](https://github.com/spectralmatch/spectralmatch))
- WorldView scene discovery, IMD parsing, and standardized metadata mapping
- CLI and library-first interfaces
- Automated SLURM processing for distributed High Performance Computing processing

---

## Installation

See [docs/getting-started/installation.md](docs/getting-started/installation.md) for detailed installation instructions or simply install like this: 

```bash
conda create -n vhrharmonize -c conda-forge py6s sixs gdal python=3.11
conda activate vhrharmonize
pip install vhrharmonize[defaults]
```
## Getting Started
For an overview of using the library see [docs/getting-started/quickstart.md](docs/getting-started/quickstart.md). The CLI can be usd by passing in arguments from a yaml file like this one [docs/configs/example.worldview.yml](docs/configs/example.worldview.yml) and running:

```bash
vhr-worldview --config-yaml example.worldview.yml
```
Or pass in arguments directly from the command line:

```bash
vhr-worldview \
  --input-file-glob "/data/worldview/**/*.TIF" \
  --output-dir ../../processed \
  --run-alignment \
  --alignment-fixed-image /data/reference.tif
```

For detailed arguments use:

```bash
vhr-worldview --help
vhr-fetch-modis-water-vapor --help
vhr-flaash --help
vhr-cloudmask-raster --help
vhr-pansharpen-orthos --help
vhr-align-image-pair --help
vhr-orthorectification --help
vhr-radiometric-normalization --help
vhr-py6s --help
```

To use on a super computer (slurm):
```
vhr-hpc prepare --config configs/example.hpc.yml # Create staged HPC/provider/slurm files
vhr-hpc upload --config configs/1.staged.hpc.yml # Upload required files
vhr-hpc start --config configs/1.staged.hpc.yml # Submit the job
vhr-hpc status --config configs/1.staged.hpc.yml # Print logs and job status
vhr-hpc download --config configs/1.staged.hpc.yml # Download declared outputs

# Other commands:
vhr-hpc stop --config configs/1.staged.hpc.yml # Cancel the submitted job
vhr-hpc close --config configs/1.staged.hpc.yml # Close the SSH multiplex connection

# Or all together:
vhr-hpc prepare --config configs/example.hpc.yml && vhr-hpc upload --config configs/1.staged.hpc.yml && vhr-hpc start --config configs/1.staged.hpc.yml && vhr-hpc status --config configs/1.staged.hpc.yml && vhr-hpc download --config configs/1.staged.hpc.yml

```

## Contributing

We welcome all contributions! We appreciate any feedback, suggestions, or pull requests to improve this project. See [docs/getting-started/contributing.md](docs/getting-started/contributing.md).

---

## License

This project is licensed under the MIT License. See [LICENSE](LICENSE) for details.
