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 Downloads

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.7.tar.gz (9.0 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.7-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pygeoglim-1.0.7.tar.gz
Algorithm Hash digest
SHA256 3e896d5fb9f54a8f1e3810c89ef8ea917f3f2e9ab248a0e4b45a0e566f8d3a9a
MD5 8c29bdfeb8a32ef5e54178b39a090e4a
BLAKE2b-256 ecb8ccb73398a49178eae7f6fc064537b7d954b5845b90e525afeced00ff4793

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pygeoglim-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 dc27cf9c7b4af01795e9802cd52e81c4410eb8c0347854530ceecf246d5d200e
MD5 19426d23a4c8c2242b67f5abf11baaee
BLAKE2b-256 49002ca13a424c9ece6dd24c8d770c61b6e9785632e7c6db30fbd344ddd7575d

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