Code Monkey home page Code Monkey logo

gemgis's Introduction

GemGIS

Geographic information processing for geomodeling

PyPI PyPI license: LGPL v3

Overview

GemGIS is a Python-based, open-source geographic information processing library. It is capable of preprocessing spatial data such as vector data (shape files, geojson files, geopackages), raster data, data obtained from WMS services or XML/KML files. Preprocessed data can be stored in a dedicated Data Class to be passed to the geomodeling package GemPy in order to accelerate to model building process. Postprocessing of model results will allow export from GemPy to geoinformation systems such as QGIS and ArcGIS or to Google Earth for further use.

GemGIS uses the full functionality of GeoPandas, rasterio, OWSLib, Pandas and NumPy.

All provided maps and examples were taken from the books 'Interpretation of Geological Structures Through Maps: An Introductory Practical Manual' by D. Powell and "An Introduction to Geological Structures and Maps" by G.M. Bennison referenced at the bottom. referenced at the bottom.

Table of Contents

Installation

Due to rasterio. GemGIS must be used with python==3.7

  1. conda install geopandas
  2. conda install rasterio
  3. pip install gemgis

Structure of Package

The core of GemGIS is made of the GemPyData class (gemgis.py). Its attributes can directly be utilized by GemPy making it easier for users to load data. Methods of the GemPyData class allow users to directly set these attributes. Multiple other files contain functions to manipulate vector data, raster data, etc.:

  • gemgis.py - core file containing the GemPyData class
  • vector.py - file containing functions to manipulate vector data
  • raster.py - file containing functions to manipulate raster data
  • utils.py - file containing utility functions frequently used for the manipulation of vector/raster data
  • wms.py - file containing methods to load WMS services as arrays/rasters
  • visualization.py - file containing functions to simplify plotting of spatial data
  • postprocessing.py - file containing functions to postprocess GemPy geo_model data
  • notebooks - folder containing tutorial notebooks explaining the features of GemGIS and example notebooks applying these features

Features

Extracting Data from Vector Files

Data stored as points, lines or polygons as shape-files, geopackages or geojson files can easily be imported into GemGIS GeoPandas GeoDataFrames. X and Y coordinates can then be extracted for these objects for direct use in GemPy. Digital elevations models can be interpolated if contour lines with height values are provided. If the loaded the exceeds the desired modeling/working are extent, the data can be cropped.

Extracting Data from Raster Files

Rasters (stored as arrays in Python) such as digital elevation models store height information. The height of interface points can be extracted from these rasters. In addition, if a raster represents a layer in the subsurface, orientation values can be sampled for the use in GemPy. Orientations are calculated via the slope and aspect of the provided raster. It is also possible to resize rasters, clip rasters or save rasters as referenced geotiffs again.

Extracting Data from Online Services

Online services provide a wide range of possibilities to work with spatial data. Currently, it is possible to load data from WMS services into GemGIS. The functionality will be extended to WCS and WFS services in the future.

Extracting Data from XML/KML Files

XML/KML Data export will be available in the future.

Visualization of Data in PyVista

PyVista is the main 3D visualization package of GemPy. In order for new users to get used to the package, it is possible to plot the input data as a PyVista plot.

Utility Tools

GemGIS offers a wide range of utility tools. These includes

  • Conversion of vector data into custom sections directly usable in GemPy
  • Conversion of GeoDataFrames into Pandas DataFrames for GemPy
  • Setting the extent and resolution for a GemPy model based on vector data and lists
  • Load and save QGIS style files (QML) for the use as color_dict in GemPy
  • Calculate orientations based on strike lines
  • Interpolate missing strike lines to calculate orientations
  • Read CSV files as GeoDataFrames
  • and many more to come

Postprocessing of GemPy geo_model data

GemGIS also offers postprocessing methods to use the data of the GemPy model. These include:

  • Export of the geological map as shape file
  • Extract boreholes from GemPy models
  • Create depth maps of surfaces
  • and many more to come

Documentation

References

  • 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

gemgis's People

Contributors

alexanderjuestel avatar bluetyson avatar endarthur avatar flohorovicic avatar japhiolite avatar leguark avatar richardscottoz avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.