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.0.dev4.tar.gz (154.2 kB view details)

Uploaded Source

Built Distributions

threedigrid_builder-1.17.0.dev4-cp312-cp312-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.17.0.dev4-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.0.dev4-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.0.dev4-cp311-cp311-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.17.0.dev4-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.0.dev4-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.0.dev4-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.17.0.dev4-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.0.dev4-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.0.dev4-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.17.0.dev4-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.0.dev4-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.0.dev4-cp38-cp38-win_amd64.whl (623.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.17.0.dev4-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.0.dev4-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.0.dev4.tar.gz.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4.tar.gz
Algorithm Hash digest
SHA256 0dad99b8e3e905fc15e8cae8681cddca495accfe1bd6e0873d76d73254f7844e
MD5 bc31d5caedfd5a1cb50b159c6c7344d3
BLAKE2b-256 f4ca858b03fb066a67efc8972e698db466c5e112d1dfec8114c08d37973cb7b5

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f51a0dd2fa21b9d38e6c7a0fadf532140b88c7cf7c1918202a52fb728190bf96
MD5 39e3b2d7a040af00ed10c7ae90cb632b
BLAKE2b-256 4538a41c96efb8a0fb5fbb66699bbd1cfc51adaa6b6fbbdeefd87af146028c02

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 435d8fee2c4979c880351ce7e080b9e93c63feb899462ff4100772160fee9335
MD5 3de52b7846889abdcad47f83a99d908b
BLAKE2b-256 800e40808da5685d4a21292f66bf0917b9b2c37358bb8f428c9bef8a7da1e4d1

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a60fdb60130dfd482847a712c07f5346f59bec7903a8eca3cfed15b220919c5
MD5 9222bfe27dbd63c3597cae5c8fd0d7d0
BLAKE2b-256 4a74cc3cc362aae6150e82383cddb253f215024dce95d9054496d2dd5567b7e9

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d40f1b83b43dfd2fd5c3ae95fd125c07e4f5524416486896174488875caa7f28
MD5 44e714b2aba9f809a91a19c0baa884aa
BLAKE2b-256 3b44c8dca4fda2829a09fc95cc3eca302e04d354fcfa670559134656c8765009

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 387bd232e8a4403a90fa395944965cfe42c3c12c409184d54ec065e5f62a19eb
MD5 801d01c8c41dca7f1e4008071ce8afe2
BLAKE2b-256 6af297a87cefad6f8e5d6eccf20d3adf0f01f12d0ddc0ea3e916b9e2dfe0194b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 702a5655f7bda2abfbd34098e54931815c60d3a36841515738f4576c5ad96c12
MD5 46c3facc5e8d8ab888a99c227170cc83
BLAKE2b-256 686528b12ff402cb09b2b363d6a9ca28cc3a71e9f0dd0e1e0a9db4664033fa43

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 491c2ad436cbdcb9645502bebec3145542ce8a6659ab01a23439d63e0d555a84
MD5 fbcf872f48d70c12d94110a1d997d352
BLAKE2b-256 b6dd89c03e517634aaa2ba4cbf749e77617f09ecc7aa8254fc029f4f0775ddaa

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1299487c663d9c70f338e1069fbe83bef875dd1708a00711258bb0baec93a706
MD5 d8665a309209842c72371ce6f6ce1bf6
BLAKE2b-256 6d71445fa00be12c3b969f20b92036d801262742fd9d9731f388d681a4b629ff

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 aff9ee1da53a111b27c94c43416b31115e79d29190dbe3d3e74b48d823ba2504
MD5 3e5d1be3c224cc5a83e01ff5607892a8
BLAKE2b-256 1f4410fc88499b0f1fd701fa521638528572af351735a2cfe452dd23f1d1956e

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 59c507b45b5bc9ea20c4511d91959340ca84d8cea641e08b31aa847946781d6d
MD5 4224dcb43c0f9e2850f2b8ce47167267
BLAKE2b-256 7a90b6da369378cbca25b1d54f5f2ef49e709228af46b87a0f6e7558ea7c1a0b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3508daaf0509270e1a591f0b8c0d204c690923cd720d15b638de20ca822f6c92
MD5 813b83db09c8d1625380942dc39cca22
BLAKE2b-256 53ba7937f2bbbefcc2de8a74886268462e21c6a8d04dc6f8f21905df26589927

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ee0ab0cb49d775491a2b6c88a9fa700195cccb06f4998e93048b4fcbb750bbad
MD5 2e01a16b5d5c64ece5b201a3d4079e79
BLAKE2b-256 ec6389b50022a2df5832d992775665dd8272c73928560243770753b165c01d5d

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ffdc05e2aee4eaf49a9d9ca48e4569d15f58018d07f16286fd3648145b04abfb
MD5 e8f825f40b96753a4caa813f04edc36d
BLAKE2b-256 03156864ea390e19a77b1dc3fd4d673de26eb7aece3784280cfc340ee105340e

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9c3b7f2f977796046b0d3be9e2277a26289aa0aaeeaf8df819a1dffcb00f215
MD5 0d443052a301a85ea1f1c510e7220bb0
BLAKE2b-256 a4b8c82206d5f2836341de0c6339ffd05bdf48b09865ca046e03036af42c894a

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 81de91f6498a3db85ce2966266adfc4e8f95ab19da1e870230783c798b81f9fc
MD5 9d117dab268132f89dd8cfe05f477518
BLAKE2b-256 cee0a67fdb142d8024e44e79e88f962c24ac02193411e943191dc958585fad97

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