Comments (6)
@AlexanderJuestel I've implemented something like this using pyvista on the lithblock. I think there is a larger idea of making a generic pyvista compatible grid class that could take "any" pyvista object, using pyvista to manage the resulting solution as well
from gemgis.
Hey @AndrewAnnex,
Would you mind sharing that to have a look if it is practical for my needs?
Best regards
Alex
from gemgis.
hey @AlexanderJuestel, I'm pretty busy for the next two weeks but I think I could post some psuedo code, below I post a written pseudo method that should be easy to follow. My current bad approach involves building a huge regular grid (code was posted into a wip branch some time ago, I think the branch is still in my fork which is public) and then slicing the resulting grid object using pyvista, but this approach is actually very inefficient as you end up throwing away a lot of the data that was computed by the model.
My (better) suggestion would be to use pyvista to create the sliced "view" that you see in the figure you posted, and then use the .points numpy array of the object to create a new custom grid object in gempy. You would then use the solution object to get the scalar field values and lithology (aka formation) values to assign pyvista attributes to the pyvista mesh you made to start with (https://docs.pyvista.org/getting-started/what-is-a-mesh.html#what-are-attributes).
I think with a little effort, a new grid object for gempy could be made that would allow for "any" pyvista mesh object to be used directly within gempy for evaluating models, once that becomes stable, all the other grid objects (cross sections, topography, regular grids, etc) could be re-done using pyvista methods to simplify the API.
Alternatively the same approach could be done using cross sections, with a little numpy it should be easy to define cross sections using the model extent. The resulting solution objects are just 2d so they may be relatively easy to convert to pyvista meshes.
from gemgis.
Will be moved to GemGIS and integrated as part of the postprocessing
from gemgis.
This will be worked on in the coming days. The only thing that is missing is a way to translate the lith_block volume in PyVista to its true real world coordinates
from gemgis.
An introduction on how to slice the lith block of a GemPy model was added in tutorial 49 of the documentation. It also works nicely when defining a profile on a map (right image).
from gemgis.
Related Issues (20)
- [ENH] Rotate GemPy Input Data HOT 1
- Error extracting vertices from lines HOT 3
- Add GemGIS to pyOpenSci HOT 7
- [ENH] Check instances where to implment arr[...,n] for indexing columns of arrays
- [BUG] Reproject raster has a rasterio error caused by closing the scope too soon HOT 4
- [ENH] Replace setup.py with pyproject.toml HOT 3
- [ENH] Open MPK files in Python/GemGIS HOT 1
- [ENH] Implement CRS reprojection for seismic data (SEGY) HOT 1
- [BUG] Tutorial 35: ValueError: Cannot subset columns with a tuple with more than one element. HOT 7
- [ENH] Read raster layer from OpenFileGDB HOT 2
- Blank texture in gg.visualization.drape_array_over_dem (+ default zmax) HOT 5
- 68. Creating finite fault. HOT 28
- [BUG] No texture coordinates when loading the sample traces.shp file from tutorial 12 HOT 7
- export 3d plotted bore hole tube in vkt format HOT 1
- gempy version HOT 3
- How to display a surface as a cube HOT 6
- Tutorial 35: ERROR:root:Could not set shader program HOT 3
- conflicts between gemgis and pandas HOT 3
- create_boreholes_3d Geographical coordinate processing exists bug HOT 2
- visualization.create_polydata_from_ts not working for single surfaces HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gemgis.