gempy icon indicating copy to clipboard operation
gempy copied to clipboard

Exporting 3D models to standard formats

Open lllxllll opened this issue 5 years ago • 6 comments

Can I export the 3D model to another formats ,for example the format I can visualization in GoCAD?

lllxllll avatar Apr 11 '19 07:04 lllxllll

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.

ejhgeo avatar Apr 12 '19 18:04 ejhgeo

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!

Leguark avatar Apr 14 '19 14:04 Leguark

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().

cfandel avatar May 10 '19 10:05 cfandel

That looks great Chloe! Do you think that it is functionality that we can put in the main library?

Leguark avatar May 15 '19 11:05 Leguark

For sure - feel free to incorporate them however works best with what you already have!

cfandel avatar May 15 '19 13:05 cfandel

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

cfandel avatar May 24 '19 12:05 cfandel