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

Uploaded Source

Built Distributions

threedigrid_builder-1.13.2.dev2-cp312-cp312-win_amd64.whl (616.7 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev2-cp311-cp311-win_amd64.whl (616.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev2-cp310-cp310-win_amd64.whl (617.7 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev2-cp39-cp39-win_amd64.whl (618.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev2-cp38-cp38-win_amd64.whl (615.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

File metadata

File hashes

Hashes for threedigrid-builder-1.13.2.dev2.tar.gz
Algorithm Hash digest
SHA256 b93f470ea125cc3725af2a8194e618172c342b4d96e229f61d33ece7bdf4d97a
MD5 e252bc6a25442d83372a8fac05c38320
BLAKE2b-256 8fbb0e7a19610863e7694f31089736b6703ceb875e6852c218d0db65dadbad05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a9d8c91fb5eec4d1ce4221e10deb1c1f69959cb9f80b698d0a340a63d6a78f0f
MD5 d9786a9c9f633127c00e702f13f4e0f5
BLAKE2b-256 8387788e0f11bbbf23100a738d89aea9d5fc104c1f5c7ed470fca95ead1932bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d7beb9d2a896253125d4feeed30e0239e4641485ce47c4768be72647a6237cd6
MD5 9ad76c14255b07dbf83bc9360034d848
BLAKE2b-256 d5fdae9474ea560ff46390952797cee3df796f6415df1448ed120a3d8b3ef24a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8cdb4ae7cda2fddcfe9cc131b2fa7d24dd047d996e8799ef36e5411a2aa73bef
MD5 58aaf6d8d066dccaf5c5c4530c51b257
BLAKE2b-256 3b32f1c03fe09eed91f6c5a74219038beeca8ca157b0c3d74ec2238ee42b97e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 19cd1ee0c3d5bcadc432dd60587aea2cd4689f973a974a2fad9adab78d039278
MD5 ade3053d182781a219469dd780e6522d
BLAKE2b-256 818c786301d65340a316326cb916f5de1718906d4817f6c472ea5f8898db8322

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 195a316bc6c0378da8580c0ccb7913140a56f5a7ac17e30ce5dec0d4ba7fe044
MD5 b7276c45dbc6ec795f781e6030ee552d
BLAKE2b-256 90ce4efc8f6397360a9309f03513efa380fd01e9a385f7f7df6881bfa27f6ce7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 229e15d0bfd3af10c14a573c45c0b0e2d0af0512b8735777faae41d7c5415cc6
MD5 be8517a0acb9c46b6bf513a23d386864
BLAKE2b-256 e5b9af44cd5853a1aed0eb45532c7464a6d5f54c406d4d5ce130eb3feecdaa58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9172b67dbf82f9fdb7bf511d5d7ec77851549a7787ce96e96cfc7e81d5288697
MD5 4c383dfb8e731767c519352ae15ac5d0
BLAKE2b-256 3c9bd948597417db808cb03f76b2e3c51b532232c764b9878601d493e6ace40a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cbb09f290323cb0a9af7ec8f377a1bd25c4576cb233c0671385b29d91e5b01d5
MD5 a0692e1153e827be530385c56a845996
BLAKE2b-256 ef375a846f3ad2b387c7ac974bb79aac4ed4033996e3aebf865b6bb89b64228f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ef6789acb6a948fea004e6acfd838c882beafe5793619d1957283c94b056f311
MD5 b52dc96a64c7754725af08e4f512fb0b
BLAKE2b-256 0c73be6dd8581e8c0b7f0a049fdcb8d108598ed2e1eefd09d1159dbe059fdbde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 84ac6739a79caf9a44ec4ebe242f5c98a9ff444afd23ee1179624830d778f089
MD5 9b414e20eb6b5857a8f2d4ca36c2441b
BLAKE2b-256 914efc7a7229702f1739c8278d7dad0aecd1fd262425d542536519f380a12b8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c507708f5b3814543a4bbb43ad71ba9858b06fa12c106c79555f428e0d425681
MD5 1de3e6b5c0b367b5710b12a20165527b
BLAKE2b-256 a57132f0de44c99ebe571924cacce4c0d406b0f1891ab4bdbec688bc4cf85eab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9e478e26311890adbdc98a7d7038d76e73db821cdfe66fdfcd86b3425d7d7611
MD5 46d24a402e4a18331963edd5138f2070
BLAKE2b-256 cf26a6c8c7c9c94c5ee0037bae038fe00531143188c125924b52ba5a24c82f40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9771fd54272c89017e6cb482762c0f79dbdb53bb371216a734410473230be218
MD5 efd1ead6d1d7b9a903978faa637c8fc4
BLAKE2b-256 a9a42ed876ae38b277720dc9138376b24409e4b83592c43c9b916559c9610ec2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23b277688333a4acc90bb0135cc007a2075d27cefe2e440c4a9eb7d3487fc966
MD5 19cbc9da5677e4210ad1c409c0eb9284
BLAKE2b-256 406ca30501bc29599fe6ac32e22aa8447f34613da8e51ce8b43be3d6d01d927d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c947a8616d809d3af9bd46e55f97a21e6ba34b90d238ddad39c4255ae2dc7e20
MD5 0c375daf63cf640a8e1e224b70312d2f
BLAKE2b-256 76d795f8d24d8b767eac1bdce08ba06ad850ebc4224a5b9028c4ff9a4d34ff76

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