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

Uploaded Source

Built Distributions

threedigrid_builder-1.20.0-cp312-cp312-win_amd64.whl (625.1 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.20.0-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.20.0-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.20.0-cp311-cp311-win_amd64.whl (625.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.20.0-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.20.0-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.20.0-cp310-cp310-win_amd64.whl (626.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.20.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.20.0-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.20.0-cp39-cp39-win_amd64.whl (626.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.20.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.20.0-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.20.0-cp38-cp38-win_amd64.whl (623.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.20.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.20.0-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.20.0.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.20.0.tar.gz
  • Upload date:
  • Size: 154.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for threedigrid_builder-1.20.0.tar.gz
Algorithm Hash digest
SHA256 ba777b75f6b2429f124f4bf1c37fa9ff9dbd45edfb1f865f80023f6129ce624b
MD5 d0418644ab23e48f443ca54f10bfbab7
BLAKE2b-256 2931308bc0055d4c446aceab1e67cc6a534988d70ac9888340e435fa0707dc4c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.20.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5a38ef92e124ffc5163199c25ff2d760afc3dd7bcc2b7c4cd3944d13b6a41baa
MD5 fe087cea08d5db199824e49e395c3f10
BLAKE2b-256 a0271fe92009c68122bc7f87b1c16e385b83ff4874299f6519e49d77a9d44091

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e33bb2b080f55ae1f2cb5afd24fdc3067733ed4df1403dc1eb8a4a8264f0c5e
MD5 d33a3dfc4cee2956b8a2d79e5cd53eff
BLAKE2b-256 8e6211494ee8d2fd75871ebfbea4116ea6e5bf2e129c72ed865c8721e11f52c7

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.20.0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5d63330a5379c1e239bb0fa5519736f4f930d459dac3a4323512b3038f083743
MD5 d4378d26310d84673423d48b5e215d09
BLAKE2b-256 f6f233351bf716aac554743f3829fa183d824ba0bf1ce056381d79f621e333b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6de22708a657ec28ace1d4a1e3b634a8687bf7b18f4b947da6968bc92fff2616
MD5 cfc7642d210bb0e0a1886411a43d23a3
BLAKE2b-256 0f7f95a3a5d0b9113ad906d5d84e22e1f36d5847df0ca123835e676ee33a572f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1ccd3e77745f5c7a992d3097c70e57c9c82b801bb4a4d32ce067df7c76283066
MD5 30cc544383bbfe743193cbfda9cb15ae
BLAKE2b-256 434c018a994f5cf6430a900d5c078b3284cc4ef51bd2b8d442865924e939065b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8d959bee240201f820d7eda15b652d5a149fb656754a9f1acdb5bbc75014c3b3
MD5 047b1defbc8823c97a6f6a2189b0e80c
BLAKE2b-256 45534724c3b5d1dffba3c2c492e6aae6c37a06732d7cfa1ac9b781a838a44fa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 19a8eff356a17b220e8758bfc377dceb6a18106f7d3a55b62d12d387ab0a7ca7
MD5 c9faecaf468855f0d3b736ca3b2a2164
BLAKE2b-256 f9c42c401b354653c5f2f87e8353315030c0168a557d71347acff4c6166ab57d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bec237eda7e9dd4f4d993d0621687217b7e9d62fc268eee9521f9248ac1c90fa
MD5 4a86b235183f2c633a53b9a7aeb39853
BLAKE2b-256 52358e4336f5c4fbc93d65e085a85d08250fb9879805a6dcea63921326a94df1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 300ed0255a643a23c28549d9303dab043e368ffb0e80b117837a50f1ff3fb9a7
MD5 8d6b9ed5f93055e6f84916034d9a6cfd
BLAKE2b-256 635acedf0afe6d5ad73112350a63f70f99db5e493e09104892ef91bcdde342df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b6842f77f64e79afb9caefec8ca2eb71cc36146038477af67a7937b251c5075b
MD5 0eeec62c00e3319f57a5853c8ad1b0f1
BLAKE2b-256 fb131f952e2aa8cf981eb28d8195daf29c91d82eef73c51f6dcfcfd031a56841

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d719f2d753dfde47ec00aa179a6691cc0b537a9a9429d7836b910053e27cd21
MD5 1a80d35deaa94629b6d8ddcea259c0f0
BLAKE2b-256 6c911b767b119867aa41493eb4503ebf889effa4c56db33e98c2f6f04bfa036b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4523ae0d815be59bb3d22f661b5f7dc34cba23bca660c4fc7af807828a1c34f2
MD5 14325349e134e65fda7cf66ecb1b65bc
BLAKE2b-256 44ea912d07e6aab5556318c3a7695b004dfa447deae32c4a72b3d097ee16d283

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f565df63a3b1c36709e727f07df45fb5436c0aac63dd1f6e35609938b32230f3
MD5 49cbff3e157b8f9837dd9c8de6092589
BLAKE2b-256 aa11b50a2bce6acf3f90e2798fb4b6b649385ba92dc06d4dcbfedb2994b6dc40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1336cb19b4efaaa5c35a8d2e34c2a77a3aa69409a76930699dca3275f8b2a121
MD5 26df08fef61beb0c7c05c309351ada99
BLAKE2b-256 8a8af486937c7e824a60f77dbaccc4aadf8d72ea444e1facf16684396f6ede71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.20.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 19d6197aaa3e4368f25395ff7954ebf20b5b2eb35a172961721effebad42529a
MD5 bd9a12669b0c333eb96be76573be56c2
BLAKE2b-256 b67f87091b62bd7ad65bc51084bc3cb48507b5ac83d8fe71687e6ffdccb7f64d

See more details on using hashes here.

Supported by

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