pygeoglim 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Mohammad Galib
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,8 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include pyproject.toml
5
+ recursive-include pygeoglim *.py
6
+ global-exclude __pycache__
7
+ global-exclude *.py[co]
8
+ global-exclude .DS_Store
@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.4
2
+ Name: pygeoglim
3
+ Version: 1.0.0
4
+ Summary: Fast access to GLiM and GLHYMPS geology attributes for watersheds
5
+ Author: Mohammad Galib
6
+ Author-email: Mohammad Galib <mgalib@purdue.edu>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/galib9690/pygeoglim
9
+ Project-URL: Repository, https://github.com/galib9690/pygeoglim.git
10
+ Project-URL: Issues, https://github.com/galib9690/pygeoglim/issues
11
+ Project-URL: Documentation, https://github.com/galib9690/pygeoglim#readme
12
+ Keywords: geology,hydrology,watershed,GLiM,GLHYMPS,geospatial
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: GIS
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: geopandas>=0.12.0
27
+ Requires-Dist: shapely>=1.8.0
28
+ Requires-Dist: numpy>=1.20.0
29
+ Requires-Dist: pandas>=1.3.0
30
+ Dynamic: author
31
+ Dynamic: license-file
32
+ Dynamic: requires-python
33
+
34
+ # pygeoglim
35
+
36
+ Fast Python package for extracting **geology attributes** (GLiM lithology + GLHYMPS hydrogeology) from Hugging Face datasets for any watershed or region.
37
+
38
+ ## 🚀 Performance
39
+
40
+ - **Individual watersheds**: 1-5 seconds ⚡
41
+ - **Regional analysis**: 10-30 seconds
42
+ - **Large areas**: 1-2 minutes
43
+ - **Direct from Hugging Face**: No local downloads needed
44
+
45
+ ## 📦 Installation
46
+
47
+ ### From PyPI (Recommended)
48
+ ```bash
49
+ pip install pygeoglim
50
+ ```
51
+
52
+ ### From GitHub
53
+ ```bash
54
+ pip install git+https://github.com/galib9690/pygeoglim.git
55
+ ```
56
+
57
+ ### For Development
58
+ ```bash
59
+ git clone https://github.com/galib9690/pygeoglim.git
60
+ cd pygeoglim
61
+ pip install -e .
62
+ ```
63
+
64
+ ## 🔧 Quick Start
65
+
66
+ ```python
67
+ from pygeoglim import load_geometry, glim_attributes, glhymps_attributes
68
+
69
+ # Example 1: Using bounding box
70
+ geom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])
71
+
72
+ # Get GLiM lithology attributes
73
+ glim_attrs = glim_attributes(geom)
74
+ print("GLiM attributes:", glim_attrs)
75
+
76
+ # Get GLHYMPS hydrogeology attributes
77
+ glhymps_attrs = glhymps_attributes(geom)
78
+ print("GLHYMPS attributes:", glhymps_attrs)
79
+
80
+ # Example 2: Using shapefile
81
+ geom = load_geometry(shapefile="path/to/watershed.shp")
82
+ attrs = {**glim_attributes(geom), **glhymps_attributes(geom)}
83
+ ```
84
+
85
+ ## 📊 Output Attributes
86
+
87
+ ### GLiM Lithology
88
+ - `geol_1st_class`: Dominant lithology class
89
+ - `glim_1st_class_frac`: Fraction of dominant class
90
+ - `geol_2nd_class`: Second most common class
91
+ - `glim_2nd_class_frac`: Fraction of second class
92
+ - `carbonate_rocks_frac`: Fraction of carbonate rocks
93
+
94
+ ### GLHYMPS Hydrogeology
95
+ - `geol_permeability`: Area-weighted permeability (m²)
96
+ - `geol_porosity`: Area-weighted porosity (fraction)
97
+
98
+ ## 🌍 Data Sources
99
+
100
+ - **GLiM**: Global Lithological Map from Hugging Face Hub
101
+ - **GLHYMPS**: Global Hydrogeology Maps from Hugging Face Hub (Parquet format)
102
+ - **Coverage**: Continental United States (CONUS)
103
+
104
+ ## 🔄 Recent Updates
105
+
106
+ - ✅ Reverted to reliable .gpkg format for GLHYMPS data
107
+ - ✅ Simplified data loading with direct mask-based filtering
108
+ - ✅ Updated column mappings for actual dataset structure (`logK_Ice_x`, `Porosity_x`)
109
+ - ✅ Streamlined error handling
110
+
111
+ ## 📋 Requirements
112
+
113
+ - Python >= 3.8
114
+ - geopandas >= 0.12.0
115
+ - shapely >= 1.8.0
116
+ - numpy >= 1.20.0
117
+ - pandas >= 1.3.0
118
+
119
+ ## 🐛 Troubleshooting
120
+
121
+ If you encounter issues with GLHYMPS data loading, the package includes automatic fallback mechanisms and error reporting to help diagnose problems.
@@ -0,0 +1,88 @@
1
+ # pygeoglim
2
+
3
+ Fast Python package for extracting **geology attributes** (GLiM lithology + GLHYMPS hydrogeology) from Hugging Face datasets for any watershed or region.
4
+
5
+ ## 🚀 Performance
6
+
7
+ - **Individual watersheds**: 1-5 seconds ⚡
8
+ - **Regional analysis**: 10-30 seconds
9
+ - **Large areas**: 1-2 minutes
10
+ - **Direct from Hugging Face**: No local downloads needed
11
+
12
+ ## 📦 Installation
13
+
14
+ ### From PyPI (Recommended)
15
+ ```bash
16
+ pip install pygeoglim
17
+ ```
18
+
19
+ ### From GitHub
20
+ ```bash
21
+ pip install git+https://github.com/galib9690/pygeoglim.git
22
+ ```
23
+
24
+ ### For Development
25
+ ```bash
26
+ git clone https://github.com/galib9690/pygeoglim.git
27
+ cd pygeoglim
28
+ pip install -e .
29
+ ```
30
+
31
+ ## 🔧 Quick Start
32
+
33
+ ```python
34
+ from pygeoglim import load_geometry, glim_attributes, glhymps_attributes
35
+
36
+ # Example 1: Using bounding box
37
+ geom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])
38
+
39
+ # Get GLiM lithology attributes
40
+ glim_attrs = glim_attributes(geom)
41
+ print("GLiM attributes:", glim_attrs)
42
+
43
+ # Get GLHYMPS hydrogeology attributes
44
+ glhymps_attrs = glhymps_attributes(geom)
45
+ print("GLHYMPS attributes:", glhymps_attrs)
46
+
47
+ # Example 2: Using shapefile
48
+ geom = load_geometry(shapefile="path/to/watershed.shp")
49
+ attrs = {**glim_attributes(geom), **glhymps_attributes(geom)}
50
+ ```
51
+
52
+ ## 📊 Output Attributes
53
+
54
+ ### GLiM Lithology
55
+ - `geol_1st_class`: Dominant lithology class
56
+ - `glim_1st_class_frac`: Fraction of dominant class
57
+ - `geol_2nd_class`: Second most common class
58
+ - `glim_2nd_class_frac`: Fraction of second class
59
+ - `carbonate_rocks_frac`: Fraction of carbonate rocks
60
+
61
+ ### GLHYMPS Hydrogeology
62
+ - `geol_permeability`: Area-weighted permeability (m²)
63
+ - `geol_porosity`: Area-weighted porosity (fraction)
64
+
65
+ ## 🌍 Data Sources
66
+
67
+ - **GLiM**: Global Lithological Map from Hugging Face Hub
68
+ - **GLHYMPS**: Global Hydrogeology Maps from Hugging Face Hub (Parquet format)
69
+ - **Coverage**: Continental United States (CONUS)
70
+
71
+ ## 🔄 Recent Updates
72
+
73
+ - ✅ Reverted to reliable .gpkg format for GLHYMPS data
74
+ - ✅ Simplified data loading with direct mask-based filtering
75
+ - ✅ Updated column mappings for actual dataset structure (`logK_Ice_x`, `Porosity_x`)
76
+ - ✅ Streamlined error handling
77
+
78
+ ## 📋 Requirements
79
+
80
+ - Python >= 3.8
81
+ - geopandas >= 0.12.0
82
+ - shapely >= 1.8.0
83
+ - numpy >= 1.20.0
84
+ - pandas >= 1.3.0
85
+
86
+ ## 🐛 Troubleshooting
87
+
88
+ If you encounter issues with GLHYMPS data loading, the package includes automatic fallback mechanisms and error reporting to help diagnose problems.
@@ -0,0 +1,121 @@
1
+ Metadata-Version: 2.4
2
+ Name: pygeoglim
3
+ Version: 1.0.0
4
+ Summary: Fast access to GLiM and GLHYMPS geology attributes for watersheds
5
+ Author: Mohammad Galib
6
+ Author-email: Mohammad Galib <mgalib@purdue.edu>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/galib9690/pygeoglim
9
+ Project-URL: Repository, https://github.com/galib9690/pygeoglim.git
10
+ Project-URL: Issues, https://github.com/galib9690/pygeoglim/issues
11
+ Project-URL: Documentation, https://github.com/galib9690/pygeoglim#readme
12
+ Keywords: geology,hydrology,watershed,GLiM,GLHYMPS,geospatial
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: GIS
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: geopandas>=0.12.0
27
+ Requires-Dist: shapely>=1.8.0
28
+ Requires-Dist: numpy>=1.20.0
29
+ Requires-Dist: pandas>=1.3.0
30
+ Dynamic: author
31
+ Dynamic: license-file
32
+ Dynamic: requires-python
33
+
34
+ # pygeoglim
35
+
36
+ Fast Python package for extracting **geology attributes** (GLiM lithology + GLHYMPS hydrogeology) from Hugging Face datasets for any watershed or region.
37
+
38
+ ## 🚀 Performance
39
+
40
+ - **Individual watersheds**: 1-5 seconds ⚡
41
+ - **Regional analysis**: 10-30 seconds
42
+ - **Large areas**: 1-2 minutes
43
+ - **Direct from Hugging Face**: No local downloads needed
44
+
45
+ ## 📦 Installation
46
+
47
+ ### From PyPI (Recommended)
48
+ ```bash
49
+ pip install pygeoglim
50
+ ```
51
+
52
+ ### From GitHub
53
+ ```bash
54
+ pip install git+https://github.com/galib9690/pygeoglim.git
55
+ ```
56
+
57
+ ### For Development
58
+ ```bash
59
+ git clone https://github.com/galib9690/pygeoglim.git
60
+ cd pygeoglim
61
+ pip install -e .
62
+ ```
63
+
64
+ ## 🔧 Quick Start
65
+
66
+ ```python
67
+ from pygeoglim import load_geometry, glim_attributes, glhymps_attributes
68
+
69
+ # Example 1: Using bounding box
70
+ geom = load_geometry(bbox=[-85.5, 39.5, -85.0, 40.0])
71
+
72
+ # Get GLiM lithology attributes
73
+ glim_attrs = glim_attributes(geom)
74
+ print("GLiM attributes:", glim_attrs)
75
+
76
+ # Get GLHYMPS hydrogeology attributes
77
+ glhymps_attrs = glhymps_attributes(geom)
78
+ print("GLHYMPS attributes:", glhymps_attrs)
79
+
80
+ # Example 2: Using shapefile
81
+ geom = load_geometry(shapefile="path/to/watershed.shp")
82
+ attrs = {**glim_attributes(geom), **glhymps_attributes(geom)}
83
+ ```
84
+
85
+ ## 📊 Output Attributes
86
+
87
+ ### GLiM Lithology
88
+ - `geol_1st_class`: Dominant lithology class
89
+ - `glim_1st_class_frac`: Fraction of dominant class
90
+ - `geol_2nd_class`: Second most common class
91
+ - `glim_2nd_class_frac`: Fraction of second class
92
+ - `carbonate_rocks_frac`: Fraction of carbonate rocks
93
+
94
+ ### GLHYMPS Hydrogeology
95
+ - `geol_permeability`: Area-weighted permeability (m²)
96
+ - `geol_porosity`: Area-weighted porosity (fraction)
97
+
98
+ ## 🌍 Data Sources
99
+
100
+ - **GLiM**: Global Lithological Map from Hugging Face Hub
101
+ - **GLHYMPS**: Global Hydrogeology Maps from Hugging Face Hub (Parquet format)
102
+ - **Coverage**: Continental United States (CONUS)
103
+
104
+ ## 🔄 Recent Updates
105
+
106
+ - ✅ Reverted to reliable .gpkg format for GLHYMPS data
107
+ - ✅ Simplified data loading with direct mask-based filtering
108
+ - ✅ Updated column mappings for actual dataset structure (`logK_Ice_x`, `Porosity_x`)
109
+ - ✅ Streamlined error handling
110
+
111
+ ## 📋 Requirements
112
+
113
+ - Python >= 3.8
114
+ - geopandas >= 0.12.0
115
+ - shapely >= 1.8.0
116
+ - numpy >= 1.20.0
117
+ - pandas >= 1.3.0
118
+
119
+ ## 🐛 Troubleshooting
120
+
121
+ If you encounter issues with GLHYMPS data loading, the package includes automatic fallback mechanisms and error reporting to help diagnose problems.
@@ -0,0 +1,11 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ requirements.txt
6
+ setup.py
7
+ pygeoglim.egg-info/PKG-INFO
8
+ pygeoglim.egg-info/SOURCES.txt
9
+ pygeoglim.egg-info/dependency_links.txt
10
+ pygeoglim.egg-info/requires.txt
11
+ pygeoglim.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ geopandas>=0.12.0
2
+ shapely>=1.8.0
3
+ numpy>=1.20.0
4
+ pandas>=1.3.0
@@ -0,0 +1 @@
1
+ pygeoglim
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pygeoglim"
7
+ version = "1.0.0"
8
+ authors = [
9
+ {name = "Mohammad Galib", email = "mgalib@purdue.edu"},
10
+ ]
11
+ description = "Fast access to GLiM and GLHYMPS geology attributes for watersheds"
12
+ readme = "README.md"
13
+ license = {text = "MIT"}
14
+ requires-python = ">=3.8"
15
+ classifiers = [
16
+ "Development Status :: 5 - Production/Stable",
17
+ "Intended Audience :: Science/Research",
18
+ "Topic :: Scientific/Engineering :: GIS",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ ]
27
+ keywords = ["geology", "hydrology", "watershed", "GLiM", "GLHYMPS", "geospatial"]
28
+ dependencies = [
29
+ "geopandas>=0.12.0",
30
+ "shapely>=1.8.0",
31
+ "numpy>=1.20.0",
32
+ "pandas>=1.3.0",
33
+ ]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/galib9690/pygeoglim"
37
+ Repository = "https://github.com/galib9690/pygeoglim.git"
38
+ Issues = "https://github.com/galib9690/pygeoglim/issues"
39
+ Documentation = "https://github.com/galib9690/pygeoglim#readme"
40
+
41
+ [tool.setuptools.packages.find]
42
+ where = ["."]
43
+ include = ["pygeoglim*"]
44
+ exclude = ["tests*"]
@@ -0,0 +1,4 @@
1
+ geopandas>=0.12.0
2
+ shapely>=1.8.0
3
+ numpy>=1.20.0
4
+ pandas>=1.3.0
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,33 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="pygeoglim",
8
+ version="1.0.0",
9
+ author="Mohammad Galib",
10
+ description="Fast access to GLiM and GLHYMPS geology attributes for watersheds",
11
+ long_description=long_description,
12
+ long_description_content_type="text/markdown",
13
+ packages=find_packages(),
14
+ install_requires=[
15
+ "geopandas>=0.12.0",
16
+ "shapely>=1.8.0",
17
+ "numpy>=1.20.0",
18
+ "pandas>=1.3.0"
19
+ ],
20
+ python_requires=">=3.8",
21
+ classifiers=[
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Intended Audience :: Science/Research",
24
+ "Topic :: Scientific/Engineering :: GIS",
25
+ "License :: OSI Approved :: MIT License",
26
+ "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.8",
28
+ "Programming Language :: Python :: 3.9",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ ],
32
+ keywords="geology, hydrology, watershed, GLiM, GLHYMPS, geospatial",
33
+ )