Skip to main content

Generate a 3Di simulation grid from a model schematisation.

Project description

Github Actions status PyPI

Generate a 3Di simulation grid from a model schematisation.

Usage

This library converts a model schematisation to a 3Di simulation grid. This can be done using a single function that reads data from an SQLite and TIFF and then outputs the generated grid into a Geopackage or HDF5 file:

>>> from threedigrid_builder import make_gridadmin
>>> sqlite_path = "/path/to/model.sqlite"
>>> dem_path = "/path/to/dem.tiff"
>>> out_path = "grid.gpkg"  # or "something.h5" for HDF5 output
>>> make_gridadmin(sqlite_path, dem_path, out_path)

Alternatively, the generated grid can be output in-memory:

>>> make_gridadmin(sqlite_path, dem_path)
{'nodes': {'id': array([   1,    2,    3, ..., 7903, 7904, 7905], dtype=int32), ...}

Installation

This package is distributed as source and binary wheels on PyPI. The currently supported platforms are Windows, Linux, and OSX, all 64 bit versions only.

First install sqlite and spatialite libraries, e.g. on Ubuntu:

$ sudo apt-get install sqlite3 libsqlite3-mod-spatialite

For raster input, GDAL is required to be present. We omitted these from the dependencies because installation of GDAL depends on your platform an on your personal perference. One option is to install gdal using apt-get, and then pygdal with a matching version:

$ sudo apt-get libgdal-dev $ pip install pygdal=={your gdal version}.*

Install the threedigrid-builder:

$ pip install threedigrid-builder

For output into a file for the 3Di calculationcore, enable gridadmin output:

$ pip install threedigrid-builder[gridadmin]

For output into Geopackage for display in e.g. QGis, enable gpkg output:

$ pip install threedigrid-builder[gpkg]

The command line interface requires Typer:

$ pip install threedigrid-builder[cli]

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

threedigrid_builder-1.17.1.dev0.tar.gz (154.2 kB view details)

Uploaded Source

Built Distributions

threedigrid_builder-1.17.1.dev0-cp312-cp312-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.17.1.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.1.dev0-cp312-cp312-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

threedigrid_builder-1.17.1.dev0-cp311-cp311-win_amd64.whl (624.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.17.1.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.1.dev0-cp311-cp311-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

threedigrid_builder-1.17.1.dev0-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.17.1.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.1.dev0-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

threedigrid_builder-1.17.1.dev0-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.17.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.1.dev0-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

threedigrid_builder-1.17.1.dev0-cp38-cp38-win_amd64.whl (623.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.17.1.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.1.dev0-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file threedigrid_builder-1.17.1.dev0.tar.gz.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0.tar.gz
Algorithm Hash digest
SHA256 31767b5398fb9fae0a39d9dd3a056303a466c93d884b06309c7b6b106bf32ccb
MD5 22a27a85cb415d056708ca76e55a1eac
BLAKE2b-256 2be5adc02fea5c1660b5798ff86be30a8094a27066fb2a2d8dfe7bf1ba54d54b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5eea9b679faaa671dcbb0c31a3a33f885cb54e64ad4f0172f527aeb1846acf2c
MD5 078247222f7c86db6e58e6c9b3c31797
BLAKE2b-256 5648ecad57f132b0de45934983f2e407f00aa358d3b716fec5bab75d12cfd5e9

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81a8e5585f205ca59d9fdc01b29e3622be46e50492ee4f694ae5e1ccf05dcb58
MD5 9dad788e499646964ad2debfe169e9de
BLAKE2b-256 cd3cc17daedfddb8eb717c25041283cdde810f91f780ed9363303ec8215c15b5

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be10543501cc764977db038587f46481818d3487b84330ca4357cb3e9a971477
MD5 91be058b393514e9b774d1fda15a9184
BLAKE2b-256 4cd8b7f7512639c559c3cb81a56c6a2c39faf86e6eb9f1950f1b3488f5566c89

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6bdb5d381fc8e3784dd7a63dd454f4a00ae91fcc82425bc2326f5a95f05bf1d6
MD5 0385fb61f1d9b7a81e4310699f4f777b
BLAKE2b-256 f4020c998af186c7dee1dc5026ff512ff859d5e21d388346b99919fc916fa26e

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 483bd963c184c7ffde130d941213e86fc791086e860168e574fa48fd03de87d4
MD5 ce4a065d167f5b90cdc086a82506dbc5
BLAKE2b-256 587da2e50ca46f16d82c2bdfcc46200f8401c599d0322645205979104abb7c4b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 937fa45e2853fc3c3f90e86b162c30b50dd8b4aafee4abd6d48478285bc1e0de
MD5 cfe7333c993de191d2bf595234cac63a
BLAKE2b-256 a8d0008895b9cb9659858ab520289993a4148c66adde3fe9a33b7a443936ff08

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 85b4d480176bb69144ff62505177708ee094cde69aae34ab2d4abc8e7573c991
MD5 e1952eeda1bf2cf8c023530e4f1185fb
BLAKE2b-256 81bb31d86c6d16ac8658f312fd8436ea661f63ca1a9661a1cc3f0ffffdb3f94b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b220932c04e4dbe88f48a54c43a30ed7ee5e3d9d39961e0db6837aa6f93bdd9
MD5 ae5a2e4ec934e80ccba9a0deeb1d75f3
BLAKE2b-256 13064be8742f14706f40878beb4936b05a17b37ae1eb02e4fe25377e48ab0c47

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a3e03d76115453f8b6f49ad6a775648d2ecb0ecf6212581e22f18d72e61aa655
MD5 f17ab159d6f55b69f6d3b50f48d7ac8a
BLAKE2b-256 524533650fc84f086915eece74d22acb70fc8cb7b8cf1b8bfae5c5afd33053fa

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 88e527c6f0c02f4523ae9b0c1df1bdbb43d81d1e20619f3c580c5bc4a6396502
MD5 d7c92d697401a99af1ad743b414ebbed
BLAKE2b-256 556475ad48cfb2c66cc5de07e035fcb250a607c89107f4e605c26886f7ad2d28

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fac9b920dc91203f7942e130888e5d1febe3e31d135dbdb93a29a3691be6948f
MD5 7e025f3186cfbece63c43dcd5704e52f
BLAKE2b-256 797a3428df31ce620c09742219e78b50f7fcf9850ba8eff539e022428ae82201

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 897c89d5e8dfff17d708ead172cb5e9d61ce91f60f6b8dcd1cb4d6e5e7df2ce8
MD5 4751d70cceeec76a7a2e66c95754a84e
BLAKE2b-256 bb3084e864359f96ce9f17f45c6514368e9aa7ffd353c438d8245024886a313a

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d54e64af6a2317af47647270eaf848af4f33beab46c585ac0d7212fd91b54d7d
MD5 349ea644c118ed12161c1817c43f975e
BLAKE2b-256 6994fbe05d5b2d101dc22c056e843d37a0530a2150efcbe1c93d2b3c3591fc46

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 549b95d6c429656cc6d304af9dac4cdb3873c25f8ac2cfe7e999816eb96d652a
MD5 3dbbf6209c6e2d2cff2a9b1a6e2acb6b
BLAKE2b-256 15dbdb25b4e93d89bf4adfe2dd2b5c3c8b6d5ab44342460d108834ac2a5699d3

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.1.dev0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1.dev0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c69052bf3e5e2b5dd3bfdf016f40b68c2b8aa61121c7e69d57ba0c7a4efb0c00
MD5 59e63150799f87cc1a6890df79a1281e
BLAKE2b-256 a7734eefd832614dd4a720fe49036b8aef651fb8f49d5b8962cfcfdb73f72540

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page