Generate 3D geological model inputs from geological maps — a high-level implementation and extension of the original map2loop code developed by Prof. Mark Jessell at UWA. To see an example interactive model built with map2loop and LoopStructural, follow this link:
3D Model from the Hamersley region, Western Australia
You will need some flavour of conda (a Python package manager, see here), as well as Python ≥ 3.8.
map2loop installation may run smoother if conda-forge
is added to the channels.
To check for that, run
conda config --show channels
if conda-forge is not in the output, the channel can be added with:
conda config --add channels conda-forge
To just use map2loop, issue the following. *
git clone https://github.com/Loop3D/map2loop.git
cd map2loop
conda install -c loop3d --file dependencies.txt
pip install .
* We're actively working towards a better approach - stay tuned!
If you can call it that, is available here
If you want to tinker yourself/contribute, clone the source code with
git clone https://github.com/Loop3D/map2loop.git
Or get the source + example notebooks with
git clone https://github.com/Loop3D/map2loop.git
git clone https://github.com/Loop3D/map2loop-3-notebooks
Navigate into map2loop, and issue the following to install map2loop and its dependencies. Note: The 'develop' flag makes your source changes take effect on saving, so you only need to run this once
conda install -c loop3d --file dependencies.txt
pip install -e .
Fair warning, we recommend conda to almost everyone. With great software development power comes great environment setup inconvenience. You'll need to download and install the docker containerisation software, and the docker and docker-compose CLI.
-
Clone this repo and navigate inside as per above
-
Run the following and click on the Jupyter server forwarded link to access and edit the notebooks
docker-compose up --build
-
To hop into a bash shell in a running container, open a terminal and issue
docker ps
Find the container name or ID and then run
docker exec -it <container_NAMEorID> bash # Probably -> docker exec -it map2loop_dev_1 bash
Our notebooks cover use cases in more detail, but here is an example of processing Loop's South Australia remote geospatial data in just 20 lines of Python.
First, let's import map2loop and define a bounding box. You can use GIS software to find one or use Loop's Graphical User Interface for the best experience and complete toolset. Remember what projection your coordinates are in!
from map2loop.project import Project
from map2loop.m2l_enums import VerboseLevel
# Note that this region is defined in the EPSG 28354 projection and
# x and y represent easting and northing respectively
bbox_3d = {
'minx': 250805.1529856466,
'miny': 6405084.328058686,
'maxx': 336682.921539395,
'maxy': 6458336.085975628,
'base': -3200,
'top': 1200
}
Then, specify: the state, directory for the output, the bounding box and projection from above - and hit go! That's it.
proj = Project(use_australian_state_data = "SA",
working_projection = 'EPSG:28354',
bounding_box = bbox_3d,
loop_project_filename = "output.loop3d"
)
proj.run_all()
This is a minimal example and a small part of Loop.
Our documentation and other resources outline how to extend map2loop and port to the LoopStructural modelling engine. We are working to incorporate geophysical tools and best provide visualisation and workflow consolidation in the GUI.
Loop is led by Laurent Ailleres (Monash University) with a team of Work Package leaders from:
- Monash University: Roy Thomson, Lachlan Grose and Robin Armit
- University of Western Australia: Mark Jessell, Jeremie Giraud, Mark Lindsay and Guillaume Pirot
- Geological Survey of Canada: Boyan Brodaric and Eric de Kemp
- Developing with docker on Windows means you won't have GPU passthrough and can’t use a discrete graphics card in the container even if you have one.
- If Jupyter links require a token or password, it may mean port 8888 is already in use. To fix, either make docker map to another port on the host ie -p 8889:8888 or stop any other instances on 8888.