NB: It is not fully developed, still a work in progress!
But you can see what it looks like here: http://geomodels.auscope.org/
This project is a website that is designed to display geological models and their associated information in 3d.
It is broadly based on these:
-
Start Angular's template (https://github.com/start-angular/SB-Admin-BS4-Angular-5) but ported to Angular 10. This provides a basic Angular+Bootstrap website framework.
-
ThreeJS provides 3d.
-
itowns provides geospatial support.
-
https://github.com/AuScope/geomodel-2-3dweb contains code to convert GOCAD models into graphics files from the command line, and a web service that provides:
- borehole graphics and information from Australia's NVCL (National Virtual Core Library)
- an OGC WMS service
- on the fly GOCAD TSURF conversion to GLTF.
Note that this project requires npm >=6.14 & nodejs >= 12.18
In order to get started:
$ git clone https://github.com/AuScope/geomodelportal
$ cd geomodelportal/ui
# To install the project's dependencies
$ npm install
The conversion process (See https://github.com/AuScope/geomodel-2-3dweb) produces graphics files and a model config file. Each model has its graphics (*.gltf *.png *.gz) files in a subdirectory under ui/src/assets/geomodels directory (e.g. for 'EastGawler' model it would be 'ui/src/assets/geomodels/EastGawler/*.gltf') Each model also has a model config file (e.g. 'ui/src/assets/geomodels/EastGawler.json')
To add models to the website, for each model:
- Copy the GLTF/PNG/GZ files to a directory under 'ui/src/assets/geomodels'. The directory should be named after the model.
- Copy the model config file (e.g. 'McArthurBasin_new.json') to 'ui/src/asset/geomodels', remove the '_new' from the filename (e.g. becomes 'McArthurBasin.json')
- Edit the 'ui/src/assets/geomodels/ProviderModelInfo.json' file, adding a new entry for each new model.
NB: For information on the JSON files, see README.md
The web service requires an Apache server with Python WSGI mod_wsgi enabled, or similar WSGI compatible server. Python should be setup as described in README.md
For development, you can use 'uwsgi' WSGI Quick Start for a quick command line start
An NVCL (Australia's National Virtual Core Library) borehole database file can be produced by running the "makeBoreholes.py" conversion script. See README.md If you don't need the NVCL database, then you can skip this step.
The web service is served from the 'api' directory as http://website/api.
Use the build_api_dir.sh script to make the 'api' directory. See README.md
Make sure that the files in 'api' can be accessed by Python.
# To start the proxy/borehole server, run 'uwsgi' in the 'api' directory created using 'build_api_dir.sh'
# NB: Make sure you have set the port number in "proxy.conf.json" (geomodelportal/ui/proxy.conf.json)
# to match uwsgi's listening port
# e.g. change "target": "http://localhost", to "target": "http://localhost:4040",
#
$ tar xvf *-api.tar
$ cd api
$ uwsgi --http :4040 --wsgi-file index.py
# Run `npm start` to start the front-end dev server.
# Navigate to `http://localhost:4200`. It should automatically reload if you change any
# of the source files.
$ npm start
# As currently set up, the prod build will output the production website files to `dist` directory
# This can be deployed to an Apache server or something similar. The output of the 'build_api_dir.sh'
# must be unpacked and placed within the same deployment.
$ ng build --prod