Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GemGIS 1.2 and PyOpenSci Submission - Issue Tracker #336

Open
wants to merge 57 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
c682bb9
Fix #334
AlexanderJuestel Jul 20, 2024
3bd4087
Fix #333
AlexanderJuestel Jul 20, 2024
6676046
Fix #332
AlexanderJuestel Jul 20, 2024
cbc9f31
Fix #337
AlexanderJuestel Jul 20, 2024
218341b
Fix tests #337
AlexanderJuestel Jul 20, 2024
ed518bd
Fix #341
AlexanderJuestel Jul 21, 2024
21c0372
Fix #348
AlexanderJuestel Jul 21, 2024
609ec9c
Fix #344
AlexanderJuestel Jul 21, 2024
8000aaa
Fix #344
AlexanderJuestel Jul 21, 2024
15ca7b6
Fix #348
AlexanderJuestel Jul 21, 2024
654b9ac
Fix Dependencies
AlexanderJuestel Jul 22, 2024
1e9d0d5
Fix #343
AlexanderJuestel Jul 22, 2024
e211542
Fix pyproject.toml
AlexanderJuestel Jul 22, 2024
c5fdc1c
Format web.py
AlexanderJuestel Jul 22, 2024
c13378c
Format visualization.py
AlexanderJuestel Jul 22, 2024
d0a2bf7
Format vector.py
AlexanderJuestel Jul 22, 2024
43daf0d
Format utils.py
AlexanderJuestel Jul 22, 2024
2a598bd
Format raster.py
AlexanderJuestel Jul 22, 2024
64938a1
Format postprocessing.py
AlexanderJuestel Jul 22, 2024
762c6fa
Format misc.py
AlexanderJuestel Jul 22, 2024
423eb17
Format gemgis.py
AlexanderJuestel Jul 22, 2024
e1b0ab8
Format download_gemgis_data.py
AlexanderJuestel Jul 22, 2024
84d01f7
Format docstrings extract_xy_points
AlexanderJuestel Jul 22, 2024
60ae6b1
Fix API Reference and other edits
AlexanderJuestel Jul 22, 2024
8ee959a
Fix #335
AlexanderJuestel Jul 23, 2024
34ddc0f
Format extract_xy_linstring
AlexanderJuestel Jul 23, 2024
ff63448
Format extract_xy_linestrings
AlexanderJuestel Jul 23, 2024
07ce0f4
Format extract_xy
AlexanderJuestel Jul 24, 2024
2e8b180
Format extract_xyz_points
AlexanderJuestel Jul 27, 2024
3f3b96f
Format extract_xyz_linestrings
AlexanderJuestel Jul 27, 2024
58c82bf
Format extract_xyz_polygons
AlexanderJuestel Jul 27, 2024
2df1ec3
Format extract_xyz_rasterio
AlexanderJuestel Jul 27, 2024
c5def25
Format extract_xyz_array and extract_xyz
AlexanderJuestel Jul 28, 2024
29e8199
Format explode_linestring
AlexanderJuestel Jul 28, 2024
606a031
Format explode_linestring_to_elements
AlexanderJuestel Jul 28, 2024
085716b
Format explode_multilinestring
AlexanderJuestel Jul 28, 2024
cb10bae
Format explode_multilinestrings
AlexanderJuestel Jul 28, 2024
538e538
Format explode_polygon
AlexanderJuestel Jul 28, 2024
e5713f3
Format explode_polygons
AlexanderJuestel Jul 28, 2024
e73687f
Format explode_geometry_collection
AlexanderJuestel Jul 28, 2024
75e4a11
Format explode_geometry_collections
AlexanderJuestel Jul 28, 2024
afedf6b
Format create_linestring_from_xyz_points
AlexanderJuestel Jul 28, 2024
53cbfbe
Format create_linestrings_from_xyz_points
AlexanderJuestel Jul 28, 2024
021a2b1
Format create_linestrings_from_contours
AlexanderJuestel Jul 30, 2024
1ff5556
Format interpolate_raster
AlexanderJuestel Jul 30, 2024
70296a0
Format clip_by_bbox
AlexanderJuestel Jul 30, 2024
4235824
Format clip_by_polygon
AlexanderJuestel Jul 30, 2024
86bcbc2
Format create_buffer
AlexanderJuestel Jul 30, 2024
805a095
Format create_unified_buffer
AlexanderJuestel Jul 30, 2024
832c437
Format subtract_geom_objects
AlexanderJuestel Jul 30, 2024
4f984d9
Format remove_object_within_buffer
AlexanderJuestel Jul 30, 2024
c6e403b
Format remove_objects_within_buffer
AlexanderJuestel Aug 1, 2024
e97499c
Format pooch functions
AlexanderJuestel Aug 1, 2024
38ea999
Format web.py functions
AlexanderJuestel Aug 1, 2024
01bce2e
EditTSReader
AlexanderJuestel Oct 16, 2024
023f64b
FixAzimuthCalculation
AlexanderJuestel Oct 17, 2024
5a8737e
Updating Dependencies
AlexanderJuestel Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# GemGIS - Spatial data and information processing for geomodeling and subsurface data

<p align="center"><img src="https://raw.githubusercontent.com/cgre-aachen/gemgis/main/docs/getting_started/images/Modern1.png" width="600">

> Spatial data and information processing for geomodeling and subsurface data


[![PyPI](https://img.shields.io/badge/python-3-blue.svg)](https://www.python.org/downloads/)
Expand Down Expand Up @@ -40,9 +41,9 @@ Furthermore, many [example models](https://gemgis.readthedocs.io/en/latest/getti

<a name="installation"></a>
## Installation
It is recommended to use GemGIS with **python">=3.10"** in a separated environment. The main packages and its dependencies can be installed via the conda-forge channel. GemGIS is then available through PyPi or Conda.
1) `conda install -c conda-forge geopandas">=0.13.2" rasterio">=1.3.8"`
2) `conda install -c conda-forge pyvista">=0.42.1"`
It is recommended to use GemGIS with **python">=3.11"** in a separated environment. The main packages and its dependencies can be installed via the conda-forge channel. GemGIS is then available through PyPi or Conda.
1) `conda install -c conda-forge geopandas">=1.0.1" rasterio">=1.4.3"`
2) `conda install -c conda-forge pyvista">=0.44.2"`
3) `pip install gemgis` / `conda install -c conda-forge gemgis`

Check out the [Installation Page](https://gemgis.readthedocs.io/en/latest/getting_started/installation.html) for more detailed instructions.
Expand All @@ -55,13 +56,35 @@ The Contribution Guidelines for GemGIS can be found here: [Contribution Guidelin
We welcome issue reports, questions, ideas for new features and pull-requests to fix issues or even add new features to the software. Once a pull-request is opened, we will guide through the review process.


<a name="citation"></a>
## Citation

If you use GemGIS for any published work, please cite it using the reference below:

Jüstel, A., Endlein Correira, A., Pischke, M., de la Varga, M., Wellmann, F.: GemGIS - Spatial Data Processing for Geomodeling. Journal of Open Source Software, 7(73), 3709, https://doi.org/10.21105/joss.03709, 2022.

```
@article{Jüstel2022,
doi = {10.21105/joss.03709},
url = {https://doi.org/10.21105/joss.03709},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {73},
pages = {3709},
author = {Alexander Jüstel and Arthur Endlein Correira and Marius Pischke and Miguel de la Varga and Florian Wellmann},
title = {GemGIS - Spatial Data Processing for Geomodeling},
journal = {Journal of Open Source Software}
}
```

<a name="ref"></a>
## References

* Jüstel et al., (2023). From Maps to Models - Tutorials for structural geological modeling using GemPy and GemGIS. Journal of Open Source Education, 6(66), 185, https://doi.org/10.21105/jose.00185
* Jüstel et al., (2022). GemGIS - Spatial Data Processing for Geomodeling. Journal of Open Source Software, 7(73), 3709, https://doi.org/10.21105/joss.03709
* Jüstel, A., Endlein Correira, A., Wellmann, F. and Pischke, M.: GemGIS – GemPy Geographic: Open-Source Spatial Data Processing for Geological Modeling. EGU General Assembly 2021, https://doi.org/10.5194/egusphere-egu21-4613, 2021
* Jüstel, A.: 3D Probabilistic Modeling and Data Analysis of the Aachen-Weisweiler Area: Implications for Deep Geothermal Energy Exploration, unpublished Master Thesis at RWTH Aachen University, 2020
* de la Varga, M., Schaaf, A., and Wellmann, F.: GemPy 1.0: open-source stochastic geological modeling and inversion, Geosci. Model Dev., 12, 1-32, https://doi.org/10.5194/gmd-12-1-2019, 2019
* Powell, D.: Interpretation of Geological Structures Through Maps: An Introductory Practical Manual, Longman, pp. 192, 1992
* Bennison, G.M.: An Introduction to Geological Structures and Maps, Hodder Education Publication, pp. 78, 1990
* Jüstel, A. et al.: From Maps to Models - Tutorials for structural geological modeling using GemPy and GemGIS. Journal of Open Source Education, 6(66), 185, https://doi.org/10.21105/jose.00185, 2023.
* Jüstel, A. et al.: GemGIS - Spatial Data Processing for Geomodeling. Journal of Open Source Software, 7(73), 3709, https://doi.org/10.21105/joss.03709, 2022.
* Jüstel, A., Endlein Correira, A., Wellmann, F. and Pischke, M.: GemGIS – GemPy Geographic: Open-Source Spatial Data Processing for Geological Modeling. EGU General Assembly 2021, https://doi.org/10.5194/egusphere-egu21-4613, 2021.
* Jüstel, A.: 3D Probabilistic Modeling and Data Analysis of the Aachen-Weisweiler Area: Implications for Deep Geothermal Energy Exploration, unpublished Master Thesis at RWTH Aachen University, 2020.
* de la Varga, M., Schaaf, A., and Wellmann, F.: GemPy 1.0: open-source stochastic geological modeling and inversion, Geosci. Model Dev., 12, 1-32, https://doi.org/10.5194/gmd-12-1-2019, 2019.
* Powell, D.: Interpretation of Geological Structures Through Maps: An Introductory Practical Manual, Longman, pp. 192, 1992.
* Bennison, G.M.: An Introduction to Geological Structures and Maps, Hodder Education Publication, pp. 78, 1990.
6 changes: 3 additions & 3 deletions docs/getting_started/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ or from single Shapely Polygons or multiple Shapely Polygons.
:toctree: reference/vector_api

gemgis.vector.extract_xy_from_polygon_intersections
gemgis.vector.intersection_polygon_polygon
gemgis.vector.intersections_polygon_polygons
gemgis.vector.intersections_polygons_polygons
gemgis.vector.intersect_polygon_polygon
gemgis.vector.intersect_polygon_polygons
gemgis.vector.intersect_polygons_polygons


Calculating and extracting coordinates from cross sections
Expand Down
18 changes: 12 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Requirements as of October 2023
# Requirements as of December 2024
name: gemgis_env
channels:
- conda-forge
dependencies:
- python>=3.10
# geopandas will also install numpy, pandas, shapely, fiona, and pyproj
- geopandas>=0.14.0
- python>=3.11
# geopandas will also install numpy, pandas, shapely, pyogrio, and pyproj
- geopandas>=1.0.1
- shapely>=2.0.6
- pandas>=2.2.3
- numpy>=2.1.3
- affine>=2.4.0
- pyproj>=3.7.0
# rasterio will also install affine
- rasterio>=1.3.8
- rasterio>=1.4.3
# pyvista also install pooch and matplotlib
- pyvista>=0.42.2
- pyvista>=0.44.2
- matplotlib>=3.9.3
- gemgis>=1.1
16 changes: 11 additions & 5 deletions environment_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ name: gemgis_dev_env
channels:
- conda-forge
dependencies:
- python>=3.10
# geopandas will also install numpy, pandas, shapely, fiona, and pyproj
- geopandas>=0.14.0
- python>=3.11
# geopandas will also install numpy, pandas, shapely, pyogrio, and pyproj
- geopandas>=1.0.1
- shapely>=2.0.6
- pandas>=2.2.3
- numpy>=2.1.3
- affine>=2.4.0
- pyproj>=3.7.0
# rasterio will also install affine
#- rasterio>=1.3.8 will be installed through rioxarray
- rasterio>=1.4.3
# pyvista also install pooch and matplotlib
#- pyvista>=0.42.2 will be installed through pvgeo
- pyvista>=0.44.2
- matplotlib>=3.9.3
- gemgis>=1.1
- rioxarray
- scipy
Expand Down
45 changes: 23 additions & 22 deletions gemgis/download_gemgis_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@
import zipfile


def create_pooch(storage_url: str,
files: List[str],
target: str):
"""
Create pooch class to fetch files from a website.
def create_pooch(storage_url: str, files: List[str], target: str):
"""Create pooch class to fetch files from a website.

Parameters
__________
Expand All @@ -46,58 +43,62 @@ def create_pooch(storage_url: str,
See also
________
download_tutorial_data: Download the GemGIS data for each tutorial.

"""
try:
import pooch
except ModuleNotFoundError:
raise ModuleNotFoundError(
'Pooch package is not installed. Use pip install pooch to install the latest version')
"Pooch package is not installed. Use pip install pooch to install the latest version"
)

# Create new pooch
pc = pooch.create(base_url=storage_url,
path=target,
registry={i: None for i in files})
pc = pooch.create(
base_url=storage_url, path=target, registry={i: None for i in files}
)

return pc


def download_tutorial_data(filename: str,
dirpath: str = '',
storage_url: str = 'https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2F'):
"""
Download the GemGIS data for each tutorial.
def download_tutorial_data(
filename: str,
dirpath: str = "",
storage_url: str = "https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2F",
):
"""Download the GemGIS data for each tutorial.

Parameters
__________
filename : str
File name to be downloaded by pooch, e.g. ``filename='file.zip'``.

dirpath : str, default: ``''``
Path to the directory where the data is being stored, default to the directory where the notebook is
located, e.g. ``dirpath='Documents/gemgis/'``.

storage_url : str, default 'https://rwth-aachen.sciebo.de/s/AfXRsZywYDbUF34/download?path=%2F'
URL to the GemGIS data storage, default is the RWTH Aachen University Sciebo Cloud Storage.

See also
________
create_pooch : Create pooch class to fetch files from a website.

"""
try:
import pooch
from pooch import HTTPDownloader

download = HTTPDownloader(progressbar=False)
except ModuleNotFoundError:
raise ModuleNotFoundError(
'Pooch package is not installed. Use pip install pooch to install the latest version')
"Pooch package is not installed. Use pip install pooch to install the latest version"
)

# Creating pooch object
pooch_data = create_pooch(storage_url=storage_url,
files=[filename],
target=dirpath)
pooch_data = create_pooch(storage_url=storage_url, files=[filename], target=dirpath)

# Downloading data to the defined folder
pooch_data.fetch(fname=filename,
downloader=download)
pooch_data.fetch(fname=filename, downloader=download)

# Opening zip file and unzip in specified directory
with zipfile.ZipFile(dirpath + filename, 'r') as zip_ref:
with zipfile.ZipFile(dirpath + filename, "r") as zip_ref:
zip_ref.extractall(dirpath)
Loading
Loading