Skip to content

The aim is to generate 3D web versions of geological models

License

Notifications You must be signed in to change notification settings

RichardScottOZ/geomodel-2-3dweb

 
 

Repository files navigation

geomodel-2-3dweb

Build Status

Generates 3D web versions of geological models primarily for geomodelportal website (https://github.com/AuScope/geomodelportal)

To configure

  1. Install Python v3 (https://www.python.org/) and these python library dependencies:

NB: pyassimp requires the assimp shared library which may need to be compiled and installed separately

  1. Clone and compile collada2gltf (https://github.com/KhronosGroup/COLLADA2GLTF)
  2. Set 'COLLADA2GLTF_BIN' environment variable to point to the path where 'COLLADA2GLTF-bin' resides, e.g.
export COLLADA2GLTF_BIN=/home/fred/github/COLLADA2GLTF/build/
  1. Clone this repository (i.e. geomodel-2-3dweb)

To convert some GOCAD files to GLTF or COLLADA (*.ts, *.pl, small *.vs, *.wl) NetCDF4 (large .vs), GZIP (.vo, *.sg). *.gp files can also be converted.

Run conv_webasset.py. You must give it either the directory where the GOCAD files reside, or a GOCAD file plus a conversion parameter file. This README explains the format of the conversion parameter file.

e.g.

./conv_webasset.py gocad.ts config.json

where config.json looks like this:

{
    "ModelProperties": {
        "crs": "EPSG:28352",
        "name": "Any Name",
        "modelUrlPath": "path",
        "init_cam_dist": 0.0,
        "proj4_defn": "+proj=utm +zone=52 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
    },
    "GroupStructure": {}
}

Use the '-g' flag to generate COLLADA files

Converting GOCAD models for use in geomodelportal website

batch_proc.py is a simple batch script used to convert the GOCAD models for the website.

Building a borehole database

make_boreholes.py is a script to create a database of NVCL borehole objects to display within the model. See this README for more information.

Code Documentation

Autogenerated API Documentation is available here

Please see README file for documentation generation details.

Acknowledgements

Funding provided by AuScope Ltd

SKUA/GOCAD software from the Paradigm Academic Software Program was used to view some types of GOCAD object files and produce sample GOCAD OBJECT files used for testing

About

The aim is to generate 3D web versions of geological models

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 50.5%
  • Python 38.0%
  • TypeScript 6.4%
  • Gnuplot 2.1%
  • Shell 1.0%
  • Makefile 0.7%
  • Other 1.3%