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

Uploaded Source

Built Distributions

threedigrid_builder-1.7.0-cp310-cp310-win_amd64.whl (634.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.7.0-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.7.0-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

threedigrid_builder-1.7.0-cp39-cp39-win_amd64.whl (634.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.7.0-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.7.0-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

threedigrid_builder-1.7.0-cp38-cp38-win_amd64.whl (629.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.7.0-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.7.0-cp38-cp38-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.7.0-cp37-cp37m-win_amd64.whl (629.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.7.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: threedigrid-builder-1.7.0.tar.gz
  • Upload date:
  • Size: 145.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for threedigrid-builder-1.7.0.tar.gz
Algorithm Hash digest
SHA256 550cca3aa9386dae9f4dc00d29a4889c8a818d34de7acec6c6dbdbf59a47f5e6
MD5 8e6e48192a0a0c0097660a4f921b4d36
BLAKE2b-256 25cf2488944e8bb729853997314d2cc1aa75004d30644af75a7b6c2030eb0443

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2a7ae1c9e898b27bb9542caee6622fb5d931d94a1a73528bedb01c1988cea140
MD5 92ef02e0b6a3a8f92df11bacc258de5c
BLAKE2b-256 f7bf4da2693ac6892da2e72a29051bb4d54594101b4322ccc315936896857141

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41861466eb8e8b5d9482df070d35d90fbfd152181af401e8d78905f222709f41
MD5 f54540de8d268839e026f530b3ec03f8
BLAKE2b-256 06b81d09392a221ef685d0d3418232694bfcd85953e1da30584180506ed480b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5b4e4606b52df8ecec6050acd2dd2d1f3ae3c9f121493c082a9af152a1f4c2ff
MD5 a64db497c28ae781c600280132e87213
BLAKE2b-256 5f51fbbb72d74a97364db39e40755d302fae8d6a85c6687a3477a68402db07c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f3a282292d6186a1f6cd24d07a4ef142be2eb91fe0f26cd5dbeaab58de81e95f
MD5 dc30827d0388d93b580b8ff55acbc3c8
BLAKE2b-256 11daaa717991c11647381473bf1ea3a7b9f810ecde835da93be4d8a7ac2cf264

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 14b0624f00c91c47e0c4a4b3b2047bf567775609b9d75a90ceb3e9b164b9f496
MD5 767c79519cbc6720362b127e8afd8e3a
BLAKE2b-256 76f941f8fec2cbd8156dc4151e50f092bed1965e5dae69024f36b814dd38599a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb28cb6856596557f8e430323c084f64e5c6c537a0d715ebe1b2cf7a367db5ee
MD5 012249c4d0ecc2a84e500e504360119a
BLAKE2b-256 737138cf85070b573f1e651504e80ce75bc97753063d147d8ad0a6f6a60f345d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 111e37b19fb29900c722c9b70d553be5f8de4e8193a4ad5843ee5f073a4e6ca2
MD5 cc5c46a9ce12b13f2428d5e4720fd632
BLAKE2b-256 851704aabcfa2c03f0e93f04f24a89be1945c6f86c3cb4652da1cccfc6e9c198

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 64a1d704800baeab2d2a9fe20adc47358f07526c55459c0554c1bb1960c110ba
MD5 0e2b2f3a29b0cbaa9d7cb09875c02b8b
BLAKE2b-256 cbecd8a8aca8965a934d28ccc9c293b5a32b9ad2c4c4641468793350cce12000

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5078ce953d64b9d1ac94bcc7f2f46c9db98615d9f6d3c6ccbfc81b607d6cb3b8
MD5 528bca65c9a3e35c23ec0b839323a37a
BLAKE2b-256 a0ab5340119b8cff8763ac801078041422af8973c9e7ae5e82e507dcaa49ea1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5451df47fa0d5dc5cbd10ac68fa5568918b8e1d6bc3b2b2bc08fdc943617994b
MD5 b1ccfb907c134c354abc013c36e08740
BLAKE2b-256 df016933467ca88e4b74b995fbfb706e57f6d02c7e0f323ebf18e4dde093bf41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c29a01140bbc95ab0f981dcaad8e0e769c1af0d41ba1d8391dec641731d50b31
MD5 bbe4a5e95be568f3f6ee6df8538d8f3f
BLAKE2b-256 3a6f76e8e84e000a1dc90d608ed619c2b1a568e380d812f7b2fa2dd53828f575

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c03749dc7641f16800e950de45b12c5e2b683e51d3298900b3c7f8000c37ab7a
MD5 3c9f7a7066fe1014b23afea6399dd8f6
BLAKE2b-256 03483c2f05919340fe02bfc621014a205ddcc37c7bc97d3b863338faa1d687df

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