Skip to main content

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)

  1. Iron Oxide (Red/Blue) — Fe³⁺ gossans, laterite
  2. Ferrous Iron (SWIR1/Red) — Fe²⁺ mafics, chlorite
  3. Clay/Hydroxyl (SWIR1/SWIR2) — Al-OH kaolinite, illite
  4. Carbonate (SWIR2/NIR) — CO₃²⁻ calcite, dolomite
  5. Ferric Oxide (Red/Green) — hematite/goethite
  6. NDVI — vegetation mask
  7. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

landsat9geo-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

landsat9geo-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file landsat9geo-0.1.0.tar.gz.

File metadata

  • Download URL: landsat9geo-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for landsat9geo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffdc9e4c9278b45da7a00285f367d5402d995580133e1177039f5b235edb2113
MD5 41ed709c413c92d1d197a47dd32bb3a7
BLAKE2b-256 640f00c298d1e01aeacc8a8a71edca394294d4a53b3cf3246b4156e1b1b191b1

See more details on using hashes here.

File details

Details for the file landsat9geo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: landsat9geo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for landsat9geo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6dce87a5d205612438bb3722adbbe99a9db7804c9dcd1e6f1c94ebc9ad83c7cb
MD5 a0e053d5bc509905b398360e62378a6b
BLAKE2b-256 0b459e227f91abde8b745f77a1adf7b6802504f8cc50b634d2d0037012daa869

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page