![GitHub Release](https://img.shields.io/github/v/release/loop3d/map2loop)
![License](https://img.shields.io/github/license/loop3d/map2loop)
![PyPI - Downloads](https://img.shields.io/pypi/dm/map2loop?label=pip%20downloads)
![Conda Downloads](https://img.shields.io/conda/dn/loop3d/map2loop?label=Conda%20downloads)
[![Testing](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml)
[![Build and Deploy Documentation](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml)
# Map2Loop 3.1
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:
<a href="http://tectonique.net/models/brockman_syncline.html">3D Model from the Hamersley region, Western Australia</a>
## Install
You will need some flavour of conda (a Python package manager, [see here](https://docs.anaconda.com/anaconda/install/index.html)), as well as Python ≥ 3.8.
### Adding ```conda-forge``` to Anaconda channels
map2loop installation may run smoother if ```conda-forge``` is added to the channels.
To check for that, run
```bash
conda config --show channels
```
if conda-forge is not in the output, the channel can be added with:
```bash
conda config --add channels conda-forge
```
### Run
To just use map2loop, issue the following. <sup>*</sup>
```bash
git clone https://github.com/Loop3D/map2loop.git
cd map2loop
conda install -c loop3d --file dependencies.txt
pip install .
```
<p><sup>*</sup> We're actively working towards a better approach - stay tuned! </p>
### Documentation
If you can call it that, is available <a href="https://loop3d.org/map2loop/">here</a>
### Development
If you want to tinker yourself/contribute, clone the source code with
```bash
git clone https://github.com/Loop3D/map2loop.git
```
Or get the source + example notebooks with
```bash
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
```bash
conda install -c loop3d --file dependencies.txt
pip install -e .
```
## Building with Docker
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](https://docs.docker.com/get-docker/), and the docker and docker-compose CLI.
### Development
1. Clone this repo and navigate inside as per above
2. Run the following and click on the Jupyter server forwarded link to access and edit the notebooks
```bash
docker-compose up --build
```
3. To hop into a bash shell in a running container, open a terminal and issue
```bash
docker ps
```
Find the container name or ID and then run
```bash
docker exec -it <container_NAMEorID> bash
# Probably -> docker exec -it map2loop_dev_1 bash
```
## Usage
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](https://loop3d.github.io/downloads.html) for the best experience and complete toolset. Remember what projection your coordinates are in!
```python
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
}
```
![sa example](docs/Untitled.png?raw=true)
Then, specify: the state, directory for the output, the bounding box and projection from above - and hit go! That's it.
```python
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_
---
### Known Issues and FAQs
- 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.
### Links
[https://loop3d.github.io/](https://loop3d.github.io/)
[https://github.com/Loop3D/LoopStructural](https://github.com/Loop3D/LoopStructural)
Raw data
{
"_id": null,
"home_page": null,
"name": "map2loop",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "earth sciences, geology, 3-D modelling, structural geology, uncertainty",
"author": "Loop team",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ff/37/8fdb023bb28edb40b17576ec017d7e3b2562860c5d2ed696bca25f8a4953/map2loop-3.2.0.tar.gz",
"platform": null,
"description": "![GitHub Release](https://img.shields.io/github/v/release/loop3d/map2loop)\n![License](https://img.shields.io/github/license/loop3d/map2loop)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/map2loop?label=pip%20downloads)\n![Conda Downloads](https://img.shields.io/conda/dn/loop3d/map2loop?label=Conda%20downloads)\n[![Testing](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml)\n[![Build and Deploy Documentation](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml)\n\n# Map2Loop 3.1\n\nGenerate 3D geological model inputs from geological maps \u2014 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:\n\n<a href=\"http://tectonique.net/models/brockman_syncline.html\">3D Model from the Hamersley region, Western Australia</a>\n\n## Install\n\nYou will need some flavour of conda (a Python package manager, [see here](https://docs.anaconda.com/anaconda/install/index.html)), as well as Python \u2265 3.8. \n\n### Adding ```conda-forge``` to Anaconda channels\nmap2loop installation may run smoother if ```conda-forge``` is added to the channels. \nTo check for that, run \n\n```bash\nconda config --show channels\n```\nif conda-forge is not in the output, the channel can be added with:\n\n```bash\nconda config --add channels conda-forge\n```\n\n### Run\n\nTo just use map2loop, issue the following. <sup>*</sup>\n\n```bash\ngit clone https://github.com/Loop3D/map2loop.git\n\ncd map2loop\n\nconda install -c loop3d --file dependencies.txt\n\npip install .\n```\n\n<p><sup>*</sup> We're actively working towards a better approach - stay tuned! </p>\n\n### Documentation\n\nIf you can call it that, is available <a href=\"https://loop3d.org/map2loop/\">here</a>\n\n### Development\n\nIf you want to tinker yourself/contribute, clone the source code with\n\n```bash\ngit clone https://github.com/Loop3D/map2loop.git\n```\n\nOr get the source + example notebooks with\n\n```bash\ngit clone https://github.com/Loop3D/map2loop.git\ngit clone https://github.com/Loop3D/map2loop-3-notebooks\n```\n\nNavigate 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\n\n```bash\nconda install -c loop3d --file dependencies.txt\npip install -e .\n```\n\n## Building with Docker\n\nFair 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](https://docs.docker.com/get-docker/), and the docker and docker-compose CLI.\n\n### Development\n\n1. Clone this repo and navigate inside as per above\n2. Run the following and click on the Jupyter server forwarded link to access and edit the notebooks\n\n ```bash\n docker-compose up --build\n ```\n\n3. To hop into a bash shell in a running container, open a terminal and issue\n\n ```bash\n docker ps\n ```\n\n Find the container name or ID and then run\n\n ```bash\n docker exec -it <container_NAMEorID> bash\n # Probably -> docker exec -it map2loop_dev_1 bash\n ```\n\n## Usage\n\nOur 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.\n\nFirst, let's import map2loop and define a bounding box. You can use GIS software to find one or use [Loop's Graphical User Interface](https://loop3d.github.io/downloads.html) for the best experience and complete toolset. Remember what projection your coordinates are in!\n\n```python\nfrom map2loop.project import Project\nfrom map2loop.m2l_enums import VerboseLevel\n\n# Note that this region is defined in the EPSG 28354 projection and\n# x and y represent easting and northing respectively\nbbox_3d = {\n 'minx': 250805.1529856466,\n 'miny': 6405084.328058686,\n 'maxx': 336682.921539395,\n 'maxy': 6458336.085975628,\n 'base': -3200,\n 'top': 1200\n}\n```\n\n![sa example](docs/Untitled.png?raw=true)\n\nThen, specify: the state, directory for the output, the bounding box and projection from above - and hit go! That's it.\n\n```python\nproj = Project(use_australian_state_data = \"SA\",\n working_projection = 'EPSG:28354',\n bounding_box = bbox_3d,\n loop_project_filename = \"output.loop3d\"\n )\n\nproj.run_all()\n```\n\nThis is a minimal example and a small part of Loop.\n\nOur _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._\n\n_Loop is led by Laurent Ailleres (Monash University) with a team of Work Package leaders from:_\n\n- _Monash University: Roy Thomson, Lachlan Grose and Robin Armit_\n- _University of Western Australia: Mark Jessell, Jeremie Giraud, Mark Lindsay and Guillaume Pirot_\n- _Geological Survey of Canada: Boyan Brodaric and Eric de Kemp_\n\n---\n\n### Known Issues and FAQs\n\n- Developing with docker on Windows means you won't have GPU passthrough and can\u2019t use a discrete graphics card in the container even if you have one.\n- 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.\n\n### Links\n\n[https://loop3d.github.io/](https://loop3d.github.io/)\n\n[https://github.com/Loop3D/LoopStructural](https://github.com/Loop3D/LoopStructural)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Generate 3D model data from 2D maps.",
"version": "3.2.0",
"project_urls": {
"Bug Tracker": "https://github.com/Loop3D/map2loop/issues",
"Documentation": "https://Loop3d.org/map2loop/",
"Source Code": "https://github.com/Loop3D/map2loop"
},
"split_keywords": [
"earth sciences",
" geology",
" 3-d modelling",
" structural geology",
" uncertainty"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ff378fdb023bb28edb40b17576ec017d7e3b2562860c5d2ed696bca25f8a4953",
"md5": "1e0eacdb601831d526c41206a00339af",
"sha256": "479a68b3ca143ab30d903bf9083cfb99ab3abbf0c71731f325e53748369a4847"
},
"downloads": -1,
"filename": "map2loop-3.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1e0eacdb601831d526c41206a00339af",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 454224,
"upload_time": "2024-12-16T23:07:02",
"upload_time_iso_8601": "2024-12-16T23:07:02.168871Z",
"url": "https://files.pythonhosted.org/packages/ff/37/8fdb023bb28edb40b17576ec017d7e3b2562860c5d2ed696bca25f8a4953/map2loop-3.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 23:07:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Loop3D",
"github_project": "map2loop",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "map2loop"
}