Skip to main content

A Python package for extracting geological attributes from GLiM and GLHYMPS datasets

Project description

pygeoglim

PyPI version Python versions License: MIT

pygeoglim is a Python package for extracting geology attributes—specifically lithological and hydrogeological properties—from GLiM and GLHYMPS datasets for any region or watershed in CONUS region. It is built for use in hydrological modeling, large-sample hydrology, and Earth system research.

📋 Table of Contents

📦 Installation

From PyPI (Recommended)

pip install pygeoglim

From GitHub

pip install git+https://github.com/galib9690/pygeoglim.git

Development Mode

git clone https://github.com/galib9690/pygeoglim.git
cd pygeoglim
pip install -e .

🚀 Quick Start

Basic Usage

from pygeoglim import load_geometry, glim_attributes, glhymps_attributes

# Load geometry from bounding box
geom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])

# Extract lithology attributes (GLiM)
glim = glim_attributes(geom)

# Extract hydrogeology attributes (GLHYMPS)
glhymps = glhymps_attributes(geom)

# Combine results
attributes = {glim, glhymps}
print(attributes)

Using Shapefile Input

You can also pass a shapefile path instead of a bounding box:

# Load geometry from shapefile
geom = load_geometry(shapefile="path/to/watershed.shp")

# Extract attributes
glim = glim_attributes(geom)
glhymps = glhymps_attributes(geom)

📊 Extracted Attributes

Lithology (GLiM Dataset)

Attribute Description
geol_1st_class Dominant lithology class
glim_1st_class_frac Fraction of dominant class
geol_2nd_class Second most common lithology class
glim_2nd_class_frac Fraction of second most common class
carbonate_rocks_frac Fraction of carbonate rocks

Hydrogeology (GLHYMPS Dataset)

Attribute Description Units
geol_porosity Area-weighted porosity fraction
geol_permeability Area-weighted permeability log₁₀ m²
geol_permeability_linear Permeability (linear scale)
hydraulic_conductivity Hydraulic conductivity m/s

🌍 Data Sources

GLiM – Global Lithological Map

  • Citation: Hartmann, J., & Moosdorf, N. (2012). The new global lithological map database GLiM: A representation of rock properties at the Earth surface. Geochemistry, Geophysics, Geosystems, 13, Q12004.
  • DOI: 10.1029/2012GC004370
  • Dataset DOI: 10.1594/PANGAEA.788537

GLHYMPS – Global Hydrogeology Maps

  • Citation: Gleeson, T., Moosdorf, N., Hartmann, J., & Van Beek, L. P. H. (2014). A Glimpse Beneath Earth's Surface: Global Hydrogeology Maps (GLHYMPS) of permeability and porosity. Geophysical Research Letters, 41(11), 3891–3898.
  • DOI: 10.1002/2014GL059856

📋 Requirements

  • Python ≥ 3.8
  • geopandas ≥ 0.12
  • shapely ≥ 1.8
  • numpy ≥ 1.20
  • pandas ≥ 1.3

📖 Citation

If you use this package in your research, please cite:

@software{galib2025pygeoglim,
  author = {Galib, Mohammad},
  title = {pygeoglim: A Python package for extracting geological attributes from GLiM and GLHYMPS datasets},
  url = {https://github.com/galib9690/pygeoglim},
  year = {2025}
}

Please also cite the original datasets (GLiM and GLHYMPS) as referenced in the Data Sources section.

🐛 Issues and Support

If you encounter any problems or have questions:

  • Check the Issues page
  • Create a new issue with a detailed description
  • Include your Python version, package version, and error messages

🤝 License

Distributed under the MIT License. See LICENSE for more information.

👨‍💻 Author

Mohammad Galib
Purdue University


Made with ❤️

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

pygeoglim-1.0.5.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

pygeoglim-1.0.5-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pygeoglim-1.0.5.tar.gz.

File metadata

  • Download URL: pygeoglim-1.0.5.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for pygeoglim-1.0.5.tar.gz
Algorithm Hash digest
SHA256 cfcfe27b898f52bcbdafce5daae05dbf42feed057d4a4b0f53b40883582c3567
MD5 e371737b52dfcd1a8c042be4c1731261
BLAKE2b-256 83def65ac42ea07a1892fe5e10c22f38d28407b7bf621689e14574aff1cdc8bb

See more details on using hashes here.

File details

Details for the file pygeoglim-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pygeoglim-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for pygeoglim-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbc96e1dda304a57f969654d72de1322cc79da65424895348abf29c796c3507
MD5 1d0e6a46406fd5b882b4616662b637ec
BLAKE2b-256 981953a435dd25062ade92a93c2d35bc3f458d04dd71a99fb68e8c0f8a465f8e

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