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.3.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.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygeoglim-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 678a040ec29517f55f3ce8493b587eb87e5b9896b03dca272ee045cd28fb4833
MD5 243d334e0a7367bfc64078fb18f5e1d2
BLAKE2b-256 0c436ff3a2aa281ba72d41860bc7133d69b50fde116739f33a42da01bcd48553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygeoglim-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 afe401e67ac7a8a924953ee4c23a04e4c6a7d21da859aa556a7d120a7902cf02
MD5 b418a14803dcf92c38775d4493a5d132
BLAKE2b-256 80abe8fa4a7a78bba357244109c314a5f057c26f1dc81d57b88e04f00154fc3d

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