Landsat 9 L2SP geological mapping toolkit — spectral indices, MVT exploration, pansharpening, and DEM derivatives.
Project description
landsat9geo
Landsat 9 L2SP geological mapping toolkit — spectral indices, MVT exploration ratios, Brovey pansharpening, decorrelation stretch, and DEM derivatives in a single pip install.
Installation
pip install landsat9geo
Quick start
CLI
# From a .tar archive with shapefile clip
landsat9geo --tar LC09_L2SP_193036_20230713.tar --shp aoi.shp -o results/
# With panchromatic sharpening and DEM
landsat9geo --dir ./extracted/ --shp aoi.shp --pan B8.TIF --dem srtm.tif
Python API
from landsat9geo import LandsatGeologyPipeline
pipe = LandsatGeologyPipeline(
tar_path="LC09_L2SP_193036_20230713.tar",
shp_path="aoi.shp",
pan_path="B8.TIF",
dem_path="srtm.tif",
output_dir="results",
)
outputs = pipe.run()
Individual functions
from landsat9geo import safe_ratio, sabins_fcc, mvt_target_rgb, decorrelation_stretch
# Sabins geological false-colour composite
fcc = sabins_fcc(bands) # R=SWIR2/NIR G=SWIR1/Red B=Red/Blue
# MVT exploration composite
mvt = mvt_target_rgb(bands)
# Decorrelation stretch on SWIR bands for subtle carbonate differences
import numpy as np
swir_stack = np.stack([bands["SR_B5"], bands["SR_B6"], bands["SR_B7"]], axis=-1)
dcs = decorrelation_stretch(swir_stack)
Output products
| Directory | Contents |
|---|---|
SR_30m.tif |
7-band surface reflectance (scaled, cloud-masked) |
ST_30m_K.tif |
Land surface temperature (Kelvin) |
SR_pansharpened_15m.tif |
Brovey-sharpened 15 m reflectance |
geological_ratios.tif |
18-band stack of all indices |
DEM_derivatives.tif |
Elevation, slope, aspect, hillshade |
Geological ratios (band order in geological_ratios.tif)
- Iron Oxide (Red/Blue) — Fe³⁺ gossans, laterite
- Ferrous Iron (SWIR1/Red) — Fe²⁺ mafics, chlorite
- Clay/Hydroxyl (SWIR1/SWIR2) — Al-OH kaolinite, illite
- Carbonate (SWIR2/NIR) — CO₃²⁻ calcite, dolomite
- Ferric Oxide (Red/Green) — hematite/goethite
- NDVI — vegetation mask
- Silica (SWIR2/SWIR1) — quartz-rich lithologies 8–12. Sabins FCC components, BSI, MgOH … 13–15. Opaque Mineral, Mineral Ratio 16–18. MVT indices — Carbonate Host, Gossan, Alteration Halo
QGIS tip: load geological_ratios.tif, set bands 10/11/12 as RGB for the classic Sabins geology false-colour composite.
Module layout
| Module | Responsibility |
|---|---|
parser.py |
MTL parsing, QA bit extraction |
indices.py |
All spectral indices, MVT ratios, Sabins FCC |
enhancement.py |
Brovey pansharpening, decorrelation stretch |
terrain.py |
DEM derivatives (Horn's method) |
utils.py |
safe_ratio, I/O, tar extraction, clipping |
processor.py |
Pipeline orchestration |
cli.py |
Command-line interface |
License
MIT
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 landsat9geo-0.2.0.tar.gz.
File metadata
- Download URL: landsat9geo-0.2.0.tar.gz
- Upload date:
- Size: 16.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa292efb180013ab0c8153efdd2517161d00e2f2c4f1eb3c4339ca3498d6868d
|
|
| MD5 |
4ec08aef0209eb5f03b1b80e6d498645
|
|
| BLAKE2b-256 |
f3028e2d6d1b0136fcdc86685cfdee84d31d7a1e03a12b2ec8ddfef1abbeeaba
|
Provenance
The following attestation bundles were made for landsat9geo-0.2.0.tar.gz:
Publisher:
publish.yml on geoharkat/landsat9geo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
landsat9geo-0.2.0.tar.gz -
Subject digest:
aa292efb180013ab0c8153efdd2517161d00e2f2c4f1eb3c4339ca3498d6868d - Sigstore transparency entry: 1275520620
- Sigstore integration time:
-
Permalink:
geoharkat/landsat9geo@5c377e79b262d1e03735a287209ae1692112b9ae -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/geoharkat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c377e79b262d1e03735a287209ae1692112b9ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file landsat9geo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: landsat9geo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3619dbcf10a9791d83c61930fb7c26d6c908af35c07ff88e9a7a6e02867d8aa
|
|
| MD5 |
d9474b702c8a62058d46d785c9cb3970
|
|
| BLAKE2b-256 |
e516c29089aec5239cdf3261fe8163f86daa7f72c5848faed3637bfe2e9c9462
|
Provenance
The following attestation bundles were made for landsat9geo-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on geoharkat/landsat9geo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
landsat9geo-0.2.0-py3-none-any.whl -
Subject digest:
a3619dbcf10a9791d83c61930fb7c26d6c908af35c07ff88e9a7a6e02867d8aa - Sigstore transparency entry: 1275520709
- Sigstore integration time:
-
Permalink:
geoharkat/landsat9geo@5c377e79b262d1e03735a287209ae1692112b9ae -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/geoharkat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5c377e79b262d1e03735a287209ae1692112b9ae -
Trigger Event:
push
-
Statement type: