cgre-aachen / gemgis Goto Github PK
View Code? Open in Web Editor NEWSpatial data processing for geomodeling
Home Page: https://gemgis.readthedocs.io/en/latest
License: GNU Lesser General Public License v3.0
Spatial data processing for geomodeling
Home Page: https://gemgis.readthedocs.io/en/latest
License: GNU Lesser General Public License v3.0
Describe your feature:
Create a function that will reproject loaded raster data to another coordinate reference system (CRS). Rasters can also be referenced to as tiles (ipyleaflet).
Usage:
More information to this issue will be added.
Test possibility for a tighter integration with QGis: reading shape files, exporting GeoTiffs back to project (similar to GE link)
Add information such as
to the Readme files
Add an object to handle points in geographic coordinate systems
Your average person won't know azimuth from agate. Obviously geoscientists a different story but they won't know dataframes from dolomite.
Don't know if you are going to throw this at some undergrads or anything but looks like it is evolving into more 'introduction to'.
So perhaps a little bit on what a surface is, why anyone cares about orientations, how to get them. A dataframe is sort of a table with an index, that sort of thing?
Utility functions that make them automatically from DEMs sounds great, really.
I think at a basic level lat/lon (everyone understands mostly) geopands/rasterio/fiona - shapefiles and tifs are good common denominators, along with geojson.
Is your feature request related to a problem? Please describe.
No - but would potentially be awesome for better links to real-world data (and model publication?)
Describe the solution you'd like
Link to EarthEngine through geemap
Describe alternatives you've considered
ArcGIS/ QGIS (e.g. #18) - ideally, both aspects will be complementary.
Additional context
https://github.com/giswqs/geemap/blob/master/README.rst
Is your feature request related to a problem? Please describe.
If you doesn't have a DTM of your area you could get it from a WMS service in the internet or you could expand your information by overlaying the DTM with a topographic/geological map.
Describe the solution you'd like
Add and cut WMS data to the study area and colouring the DTM simply by inserting a WMS-link to a function.
Blue points are boreholes (Picture source)
A roadmap for GemGIS:
What is the aim of GemGIS?
Providing a way to interactively select/add/edit/delete input data of all kinds that is needed for GemPy. Make it easy for beginners to build a first model (geological knowledge and some coding expected).
What do we need for that?
A tool to display map data and to interactively select and store data automatically. It should be easy and intuitively to handle. A very important aspect is that we avoid changing/protecting existing data unless you want to and that it is easier to add data for a particular surface, similar to editing features in QGIS rather than filling out the table maybe.
Simple vector and raster manipulation tools in the background of GemGIS, especially reprojection of data.
Extraction of points/vertices from rasters and vector files.
Ability to import styles from QGIS to color your data.
Maybe some statistic tools or plots such as the frequency of selected interfaces for each surface or stereonets (partly possible with GemPy already).
Ability to georeference geological maps (setting the extent of an array in its simplest form) for point selection afterwards - https://rasterio.readthedocs.io/en/latest/topics/georeferencing.html
Ability to create a topography based on digitized contour lines or a line shape file.
(The last two points could be interesting for teaching purposes where students could digitize a map and create a GemPy model afterwards)
Which tools do we have already?
Is your feature request related to a problem? Please describe.
Currently there is only tutorial 5.1 on how to add uncertainties for interface positions. A tutorial/notebook for adding uncertainties for orientations is missing.
Describe the solution you'd like
I would like to create a notebook using the code by @elimh (fishdist.py) to better illustrate how uncertainties can be assigned to orientation values so that future users have better access to it
GemPy currently works with pandas DataFrames. Geopandas is an extension to pandas which allows for spatial operations on data. This includes selection of data within a given area, checking whether one geometry contains another, intersections and so on.
To switch from a DataFrame to a geoDataFrame requires the addition of coordinates and a CRS. They can be added either automatically by importing a spatial file format (.shp
, .gpkg
) or by converting a given geometry column and assigning a CRS to the metadata. This will also create a spatial index which can be used to query the DataFrame based on location, in addition to other attributes.
In principle, this is a fairly simple change, and should in most cases be non-breaking, since all the normal methods for DataFrames are available to GeoDataFrames. The advantage will be in gaining the ability to query parts of a model spatially: one could subset an existing model's points by eastings and northings or similar.
In the absence of a geometry, GemPy should fall back on using a standard DataFrame as it already does.
Describe your feature:
In order to interactively view/edit maps, the package ipyleaflet (https://ipyleaflet.readthedocs.io/en/latest/index.html) could be utilized.
More information to this issue will be added.
Is your feature request related to a problem? Please describe.
When producing a large number of profiles, it may be easier to view them in a way as shown below. Here, the plots were flipped to the surface to allow following the evolution of geological features across the working area.
Describe the solution you'd like
It should be able to plot x or y cross sections at a certain increment like shown below but also custom sections. In addition, it should be possible to adjust the vertical exaggeration.
Is your feature request related to a problem? Please describe.
For a geologist, it is vital to describe the depth of a layer in the underground. This could be relevant for geothermal exploration (depth of the target layers) or in general to describe the setting of a layer.
In addition, the thickness of a layer may provide insights about local depocenters or just how thick the layer is across the whole model area (where does my reservoir have the highest thickness).
Describe the solution you'd like
It would be great to have the possibility to plot the surface and its color as a function of the depth or thickness like commercial software is capable of. This could go in hand with a better method to select single layers for plotting next plot_all_surfaces
.
Describe alternatives you've considered
None but it should be fairly simple if one can access the different meshes and their attributes...
Add functionality to export colors and later also linewidth, style etc.
Create functionality to select and deselect data and to sample data to create a GemPy Model. This will decrease the time that is needed to always add or delete formations from a dataframe.
So, if a formation is selected, it will be passed to GemPy, if not, it will be excluded. In a similar way, we could add a field that takes an integer defining the number of points that the user wants to use for the model.
Describe your feature:
Create a function that will reproject loaded vector data to another coordinate reference system (CRS).
Usage:
More information to this issue will be added.
(How) is it possible to get the absolute elevation of my pixels in the picture? With load_as_map
or load_as_array
I only get the relative values as colours.
I want to use a WMS as a digital terrain model (DTM).
Add the possibility to add labels (city names or names of structural elements) to PyVista plots. This can easily be done by loading CSV files or vector files (points). This would enhance the interpretation of output data as the viewer can locate the map right away.
We should be able to read CSV files with Pandas, assign a geometry column and crs and return a GeoDataFrame
See here:
Lines 642 to 649 in 3f0fe53
A geotiff should be created from an array containing the information of the geological map. This should easily be done in rasterio.
This goes back to the note created by @flohorovicic
https://github.com/cgre-aachen/gempy/projects/18#card-33751728
Making use of an open format for symbology for at least colors would help a lot.
Create Temperature Maps to visualize a first-order approximation of the temperature at depth based on a provided geothermal gradient. Later, this could be expanded to also account for different thermal conductivity values of the different lithologies.
Just a style thing, but I noticed 'wells' mentioned. e.g. not everything under the ground is liquid? So could make that more general?
Putting this in a separate issue since it's just a small question. :)
Is it possible to return a lithology array where all cells above the land surface have been filled with NaNs or zeros?
It looks like you have something set up for it with sol.mask_topo()
, but there's not quite enough documentation for me to figure out how to do it.
sol.mask_topo(sol.mask_matrix)
gives me a dimension error because one is 1D and one is 3D.
Currently, raster files have to saved as PNG files in order to be displayed as an image overlay. This will create an additional file on the local.
However, it should be possible to directly load TIFF files as image overlays or at least store them temporarily so that no new file is being created.
Is your feature request related to a problem? Please describe.
When looking at a 3D model in PyVista, it could be useful to be able to generate plots like shown below or even with a focal point that shows the "depth" of the model. This would help illustrating the evolution of a feature within the model.
Describe the solution you'd like
It should be possible to display slices in a certain cell increment (x,y, or z direction) or selected/all custom sections
As reference:
docs.pyvista.org/examples/01-filter/slicing.html
Describe your feature:
Create a function to read raster files.
More information to this issue will be added.
Describe your feature:
Create a function that will convert vector data to geojson files. This is needed to display vector data in ipyleaflet.
More information to this issue will be added.
Include better methods to transform coordinate systems, with special focus on UTM to/from lat/long for now
This can easily be done using GemPy. The visualization of the borehole data needs to be adapted.
Below just a very quick example. The colors are according to the lithology ids.
What else is needed?
Removal of data above topography
Indications of faults in the log
Indication of depth of interfaces -> create function to export dictionairy containing this data
Is your feature request related to a problem? Please describe.
It is not related to a problem.
Describe the solution you'd like
Since many Geological Maps and fault traces are available as vector datasets, it should be possible as an option to display these maps and line features below the input data. This is similar to issue gempy-project/gempy#370. A solution could look like the screenshot below. This may help the geologist/user to get a better feeling of the spatial distribution of the data and aid during the modeling process. It may also help when actually loading data into GemPy to ensure that all (relevant) faults and lithological boundaries have been obtained if the geological map is one of the main sources of data for instance. Especially for placing necessary orientations or interfaces in fault blocks which currently don't have any and may cause a LinAlgError ;)
Shape files can easily be read in with geopandas and easily be plotted below the shown input data.
Additional context
I would like to implement the feature myself if it is deemed useful :)
geology = gpd.read_file(os.pardir+'/Data/VectorData/GeologicalMapAachen.shp')
ax = cols =[ ('#7fa056'), ('#67a599'),('#7fc64e'), ('#cb8c37'), ('#f2f91d'), ('#009270'), ('#f2f91d'),('#812b92')]
geology.plot(ax = ax, alpha=0.25, edgecolor='k', linewidth=0.1, column='SYSTEM1', cmap = ListedColormap(cols))
base_tertiary_interfaces.plot.scatter(ax = ax, x= 'X', y = 'Y', c = base_tertiary_interfaces['formation'].apply(lambda x: interfaces_colors[x]), s = 50, label =base_tertiary_interfaces['formation'].unique())
plt.grid()
plt.xlim(minx,maxx)
plt.ylim(miny,maxy)
plt.ylabel('Y [m]')
plt.xlabel('X [m]')
plt.legend()
plt.gca().set_aspect("equal")
plt.title('Number of Interfaces: %d' % len(base_tertiary_interfaces))
print('Number of Interfaces: %d' % len(base_tertiary_interfaces))
base_tertiary_interfaces.head()
Create a function to automatically create GemPy models from attributes of the GemPy Data Class
Is your feature request related to a problem? Please describe.
Methods to handle geographic data
Describe the solution you'd like
Handling different coordinate systems and projections, methods to read and translate different types of geographic information (kml-files, shape files, etc).
Describe alternatives you've considered
n/a
Additional context
Can - at least partly - be based on remote-geomod, but surely needs a bit more thought for tighter integration.
This is a list of examples that I would like to provide to the GemPy project after my thesis:
Function to create depth maps for a single surface - Implemented in GemGIS
Example on how to draw random values from a von Mises Fisher Distribution (based on the works of @elimh and help of @Japhiolite :)). I may also be considered reworking fishdist.py due to an outdated spherecluster package - gempy-project/gempy#30, #38, gempy-project/gempy#475
Example of a simple model of a fold and thrust belt for the Sphinx gallery
Example/Tutorial on how to get larger datasets more efficiently into GemPy utilizing the capabilities of GeoPandas and Rasterio (working with spatial data) and later hopefully with GemGIS - Implemented in GemGIS
Model of my thesis as "PyVista Project" -> providing the vertices and edges to calculate meshes and view the model in PyVista, no input data though
Function to extract a vertical synthetic borehole - Implemented in GemGIS
Prepare Kartenkunde Examples as GemPy Model - currently done in GemGIS
Create GemPy models from cross-sections of von Winterfeld (1994) and Ribbert et Wrede (2005)
Create animations from Cross Sections - See Elisa's Notebook
Create 2D plot of cross-sections #35
Create 3D plot of cross sections #36
Create 3D plot of Uncertainties and Information Entropy
Function to plot well paths in PyVista according to lithology and plotting well logs with the radius of the well as a function of a log value
More examples to come maybe :)
Hi All,
Started recently to work with GemPy, targeting automatic generation of realistic 3D velocity models. So far, I have not found a simple way to perform this, and wondered if anyone has accomplished this before, or saw sample code that performs this?
Best,
Amir
Describe your feature:
Create a function to read shape files (vector data).
More information to this issue will be added.
The aim could be to save all data sets in a ZIP folder like dataframes, lith blocks, etc. and to load them again if necessary to avoid recomputing the model but still be able to use the computed data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.