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.11.4.tar.gz (150.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

threedigrid_builder-1.11.4-cp311-cp311-win_amd64.whl (625.0 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

threedigrid_builder-1.11.4-cp310-cp310-win_amd64.whl (627.8 kB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

threedigrid_builder-1.11.4-cp39-cp39-win_amd64.whl (627.6 kB view details)

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

threedigrid_builder-1.11.4-cp38-cp38-win_amd64.whl (623.0 kB view details)

Uploaded CPython 3.8Windows x86-64

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

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

threedigrid_builder-1.11.4-cp37-cp37m-win_amd64.whl (622.7 kB view details)

Uploaded CPython 3.7mWindows x86-64

threedigrid_builder-1.11.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

threedigrid_builder-1.11.4-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file threedigrid-builder-1.11.4.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.11.4.tar.gz
  • Upload date:
  • Size: 150.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for threedigrid-builder-1.11.4.tar.gz
Algorithm Hash digest
SHA256 5555887601b558e81813ca76f2db43f25dc6db0a28d59354756b76902173e0df
MD5 7addff977aa3a004220b62070a2916bd
BLAKE2b-256 fb0aabe657393eb5f9423ac40fa693fc048afe4dff8481d6e4068229233acd1f

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 459c1eac11d8a3d7be19e7988227b78a3590fb00dc22461d212f23740b924eac
MD5 682e5475278ec7acf7be9b800389f59f
BLAKE2b-256 910b23fca6dbc89f40e21d9523e15eb130327cfee7e0fb14044bf260c88e67f0

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4328f0ee4c21284e397f854d5900b701a4df2e5cf501c357765d292bacb7e4fe
MD5 c2a9b73184455efd5592de70375ad36d
BLAKE2b-256 396b41b1737e13e4c4625c801e5c16a41cc4323225602720e4564a638d61d1a7

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9ca60ef73813b8c5d6af152299e9450775d11b0f606cec931138dad701fdb8a7
MD5 ca191441585fdfed550e8a66322c83f1
BLAKE2b-256 c6bcf3c7e617c6792918d3f8b77ce78859ebfdab7a8c93413f90aaef0a07116d

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cb26ffa5b3ab052da2e8895ed5bcd8fb4e9043e75e0447395d8ec496673c7331
MD5 ba7859a862fdf696ca1eae7be167b4cf
BLAKE2b-256 c0d900f8bba98ea272825e2eaf013f983cb91d620aca29980c7de1767426a471

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f3d5bc788cc03d5baa7f55b8df9c78dfda8868db03f2099b69f9668330278ff
MD5 fc6abfc7a31665a08b3d58e05d2dcd4a
BLAKE2b-256 3ee5ced7142226e2b2814b35318e0b9715da7a63f13274aa2e3949e37d2f416c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 35357b998d242d703f2f17d45916d6f14859267b60f539e7467994e2b267943b
MD5 52af2cf786e9bccb082004b937c7086e
BLAKE2b-256 c6e722953c7aa25f40cfc74170ff35a7786b5f4a7ac78a7147bc12eba66b0cc4

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d5625545b148b8694607fcdb7ea89b77af8d95f006212f8b35116d29887a4933
MD5 827251e1a71a90b942a205ff5ce6531f
BLAKE2b-256 238a3dbc65fae7a4364c00df2c26a552fb6be4fdc71758b3d8b34502031d8cca

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cacbb278c325bc168b0bfa80772af26da85d01c4fc847dbf4cd78c622fbf63a9
MD5 7f6be39edca2606016a7fe611a027a08
BLAKE2b-256 f1dd7c71b837250bb3594c1dddd3524d4dd5d137e35c8aa7643c7f83d1a865d4

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aedd989ed358d42e0fbb482f883291d73b70ed7c301da0b403f6ef60ad67c821
MD5 85e883237ad16643d580ae19ca453c03
BLAKE2b-256 ffc4ab6ebbdc754c00edb361bdc766f75cd751df6984d4fb7d4314e1c96d612c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d8e41490480275f94bba4ab5396bffb85725e3fa7e9392080e79bd30bbc26ff0
MD5 3738dab23d57eff88b74221d138081b2
BLAKE2b-256 3f503455dc94f30544199c767fa5bb3c30d9ab7992cb824ce26d29ea2bab93f9

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 caa0c54d841b9899f101b254f71b58a31d460ae75fc2a71111b3f68a185f0602
MD5 0058940f0ef84924d0557655df7b09d5
BLAKE2b-256 ce596fd7a8a52856c85c1e860765c4181723895bfd8ab7aa20180b7e03a4ce0b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a240f0e0eb467cedf79d9224667d11b1a35eb77cbaa0bdba9695ecb4392791c0
MD5 88460fdaec71ba1c1fd50efdbcb57f94
BLAKE2b-256 a47446c9a71eef0af91a2d2ef24039afead2d1a8a52566b98626742306e4caf7

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0cd8baf4c74539a88e200a3d72110c58fa8f29462082717fbe6b4a4198e6960d
MD5 f43c553e7dbdb6ab8bd1de842f23c01f
BLAKE2b-256 2f04785a63a1d9410088a60138296318a9d022bbfafd75eeffda6865c06d5333

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b932bd4b55183025ac8746c6e07c5a79243e936290301d5908fb1787d51e815e
MD5 3679a8496fba200145cfe4e4e4924b74
BLAKE2b-256 b01c3e2483e8c1f361c906bf64415e2957787b220e5a18d745aec6ee40b20d4b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.4-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.4-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f035cb387aedef928162a209397bc49e9ca6bd5554b65a1213ce5df50a886825
MD5 35faa8a3a304649d5a29365dcac04291
BLAKE2b-256 a093890e42961d175c7d1c8fcbc2aa16edc066261509b98a1f5e7d44dfd6fb3e

See more details on using hashes here.

Supported by

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