gempy
gempy copied to clipboard
Exporting 3D models to standard formats
Can I export the 3D model to another formats ,for example the format I can visualization in GoCAD?
I have a similar question. Can I export the 3D structure model such that every voxel has an X,Y,Z, and density value. I would like to do this so that I can import it into another program I'm writing, where I need density and location of every prism in the subsurface domain.
All the data in GemPy is stored in numpy arrays so as long you know the structure of the format you want to export it should be easy to put them together. In concrete @ejhgeo X, Y, Z can be found in geo_data.grid.values and the correspondent property in lith_block[0]
It would be great if all of us start to build a module to export to the main softwares out there!
I wrote small functions to export to/from gslib files if that's at all useful: https://github.com/cfandel/gottesacker/blob/master/mapping.py
Look at mapping.export2gslib(), and mapping.importgslib(). Examples of usage can be found in this notebook: https://github.com/cfandel/gottesacker/blob/master/gott_v8.ipynb, in the section titled "Geologic model (GemPy)"
Both functions require model grid data obtained from mapping.importDEM().
That looks great Chloe! Do you think that it is functionality that we can put in the main library?
For sure - feel free to incorporate them however works best with what you already have!
Update: I just re-wrote the gslib import/export functions to be compatible with gempy v2. Here's the file: https://github.com/cfandel/gottesacker/blob/master/mapping.py