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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.8 Windows x86-64

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2.tar.gz
Algorithm Hash digest
SHA256 93a2b8d48ec31b21d068d8ef50a217492256607f664c18a5e58aa60a420f9678
MD5 0b2ec12d2c4fd4aea6fabc86d1f78075
BLAKE2b-256 6990aa0684d1606ee7a5c844afdd1e2db5fb9335f94d2056044828bd35691fe8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a9057ba899c5911c67c98bb887f00135dcc4255ae759964e133caac77cc5c0a8
MD5 f920178b3b7bdde3ae1c728a828ff259
BLAKE2b-256 9b10e9d40ff972162a2666350b00385a640145fc82120a92af2f8b295d2d5644

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20f6ec519743296fa0e22bb192cb359ea526e9df26f0d9554a486007b906706b
MD5 e2d7b231dd4c35cd294c70cfcc76d313
BLAKE2b-256 0ea3f1154b3bc1acfb417efd68cecd1296eee268bdab249b4fb2690a0af4e68a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a2983db60afec18589ba02b6e818597a44c1e4eb05afa811d7b277a8d186aee3
MD5 018cfcf7ddb324bebd016e2ec4ae6906
BLAKE2b-256 8515962cce56dfeaad36ecf8e07cc3aac05e7ae69e7e8034947b6fa60d2ae803

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 56d54896a0a7f6fef5e2c54021a2f0531610591bd3895c9776ba660c2f2e989d
MD5 a686284eeef4087bc719b7dbe184ed85
BLAKE2b-256 994776b91c35f238d15a51dffbba3b4cf82e7ad514cf31872b5d31dab7920951

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 973223da01f6105ce54b8d02060320195cd9c33edb5ac983a8b681cf73a62db7
MD5 e470cd08a379cd8687dafc922e864fcf
BLAKE2b-256 6cb8a88a3cb61449ef82503d9c911746c33cdc4297b8c5f2418025add1b75ce5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05f59c36fd9234e1825bda8d8b28c74a04339dc5ade65d633566b9dc7564e076
MD5 7c79d3af08831fa6acb2f7cb701af6a4
BLAKE2b-256 10727a0bb2b1837ec105b5f2d70197a1fbd616e7c9e416c8528857e5109a8813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f918df57244ea63a666e3f3d7ee24e0f1cb57c403b69dc025015421f83249f7e
MD5 f6133b5cdb3100568cdc37428c067ef3
BLAKE2b-256 d5364695ecc6bcbc3a8a63d03bebc672c9939a4a0f88ddd2d0bbf2e1f19c3e72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09bc85ba4b78265518cb7259dbd8d4db4e5c287139f3bcdceff43940ac8b73ba
MD5 dabed7fa78f386ea221b9d621c14e4bf
BLAKE2b-256 34014fb5adc3d88c5090c5795eb2e5f140aaa65efc778845d300d131fb4fab70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ace8243d50282c4eb355e8a58246b80cc1b0c1275262749d19045da6b383cb59
MD5 e41a57365d5b484493d6e9343a8c4b72
BLAKE2b-256 4942f6e69df252e54f55c2c6991dfb5c1004f57dbe0a4642eb1aafa97fca250a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0978c5adc2ed3f7b3ac8c77a7727503225edc03fdf4d322917fa045bd50a62be
MD5 d277fdadee539e24d3e7a212d66ace87
BLAKE2b-256 4d85499baa854267f9dc2b2018bf8d7f484a1667346abe6b4426eec5ed6d7048

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fb56f78874b5ec56c72fa68929132ba28b9d9f13979f4343adde5238bb3bb99e
MD5 77c868c13e6eeb8e9803c7c1bb461d1a
BLAKE2b-256 404d85484fdb5c0282fc9e58b046a299d01a8e2950fe9cf5fe2ad284122da319

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ebb072cac97687b906c0387e60211ca02992e86fdb96a27f35d539c9970c97b1
MD5 bd63c81e1ba8f9983376257f073f57e4
BLAKE2b-256 87340bed93b60d0e87da5119dae8f4dc36fa9bbcf160900da0948ad3bb29693e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 955fd54734be255ac0d8805ac9fbbb70425dc685a7d209769c304ee0177dd5df
MD5 9308de133b7cce83cdf92296aba75087
BLAKE2b-256 ed4b0d9b8189b65ef33402a3388c38a6178aa9127d7b927798409beffe23718b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 66b7490f85f23db9ea9cc10542ddc2dca717597a1566cb2a057147967e763743
MD5 1dc001e4c244f04ef55d12fa4992b2d8
BLAKE2b-256 8722addd2f0438751c792992cfab03a311106f63a47ff24b0a4572536da0a108

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3f5b53ebd8dace36d3119a078f39b0abed211612f5865cb1d10cf540467f0141
MD5 b650c5daab5a564df4b0d45ef781e0e3
BLAKE2b-256 1e57cd728c4ded7fb69c02949ae31fa62ed6aac65fd9f55efa6e12924e0a8f86

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