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

Uploaded Source

Built Distributions

threedigrid_builder-1.12.2-cp311-cp311-win_amd64.whl (624.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.12.2-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.12.2-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.12.2-cp310-cp310-win_amd64.whl (627.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.12.2-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.12.2-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.12.2-cp39-cp39-win_amd64.whl (627.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.12.2-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.12.2-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.12.2-cp38-cp38-win_amd64.whl (622.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.12.2-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.12.2-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.12.2-cp37-cp37m-win_amd64.whl (622.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.12.2-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.12.2-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for threedigrid-builder-1.12.2.tar.gz
Algorithm Hash digest
SHA256 5c9e71da3f9161a6473ef5eba0dc8f9c9ea6f3d9d8f6a61038faeab7d440bda9
MD5 079ec3cbec7c0db509a0517103f85b35
BLAKE2b-256 21692594b6cffcac53014fe8f78c7aaebd19d4d34d605d31b08213234025f319

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a64393dfd9901a925e8719ead645ca5785a3aea55a940a0e134c14282acf2f51
MD5 ba31b3a0b02755b68eb714ca638acedc
BLAKE2b-256 e4ab830c0434f417114c72088e9fafd55659de7337a8227d3b6c30399d6e2dbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 93b2a8ec8bab30f5fbf381d3a3f4313174b5adedaa1e2a0ca09c415be7f07196
MD5 1f70a6789eb7b638a13d0bf62276e928
BLAKE2b-256 3e294a96542621447c7efeeca37e577bdcf785b9b1e4a02e23217473cdeff884

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7d8b35af22d5b166df4c2a7b0adf513605172cf8c2516aa0dab44bb68ffa698d
MD5 15ae1d0a3a8381b2ea2b9e89d40a6525
BLAKE2b-256 8684ac312713c374fc75fe713bbe16ed469c7f598323daa3b35e6db85806321b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 da55e98319361c048c52f11c87d783ce3dd59693cfb03c03e87b8afba4df4744
MD5 146c140b8623ec629c53d3883412a8aa
BLAKE2b-256 9136be91a73d2e6092059f2fb8841d60ff55195398d1edcbb4a02cc577e8f9e3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ed0e240876811820fbab0754a648e764bc821a13f19f85947eb7bf91dd8e541
MD5 5aa9cec1bb8c91894791d052286abb05
BLAKE2b-256 0fb4c53baf368f3bbbe2ea535edc4ec4966fe96e32a0b7e570b1d64a0c42692c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bd0c39b050f2096f061c38c8a3d2669e6de2890416df0621e77d8aab8520e97e
MD5 6921908d9f3e6e1dd37f6b91936e173e
BLAKE2b-256 d5f6ef209fe0afa1884b0feed8c64e223e4a4184f2fe9e88603537804ebce43a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 359416cb4f2eeb3e15c7b750c2ca4d16fd51b777bdccf3c0ed2d871c7941cdfe
MD5 596aab186dcb68055f6c5cf5b0f19e47
BLAKE2b-256 76c705c7d8e5e400f614003fe8871067241ea13144c660dca5a93bd8265bf83a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 41ee53ff2cce4847bdf0f0807c3560bee073e532f84ea10a6b0d697396034570
MD5 7e0fc7bd86926ae745c4ed1b8a25d416
BLAKE2b-256 dd47db7eda0da5dcc94fd9483966215f99722e37edb3f0ce2e5c6de1293d4892

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4b2d13f3b5578a7febe60e60b44b7af2719e524d239fcd820a430c54151796b5
MD5 0ceac2c31d0d1bfde0cee79913f8d29e
BLAKE2b-256 ec48d7d8f45e9289e71d3971edb327337662397a6b0ec867750d7ba6fbf65da5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 4fdd54ddbcce0673eab5dfe13a5e68469aacdeeef85458afcfbe4b8653fcbd37
MD5 9ce78166fcb2d66654a28a0666083d2f
BLAKE2b-256 0b64abcda752f5797e2ca006c4508e4c8323ac48b2dd1c721b9dbbbbfc150906

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d371316f2c9c0449e20164c797654b1129a93870e9be3e9cace9cb7f4f7f77c1
MD5 c3723b9e7b9ca0e0f9faf57647dc994c
BLAKE2b-256 bec859aa6ac9e9093a0ec5477dbce2209d20dad8f12efa7657c33bf19ba6db2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 642e90eec2846d2cf7d50a64de4c13fcd090233f8bae784889e63d0e91a3a5b5
MD5 306e40386c3ba762bd3b78e5fe783186
BLAKE2b-256 43945852ce0869865956f81fa8f59d60d0f4fb18b57f3e5c32c477a59b1f4727

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 54f0ed1c572c4e69905b3ee778c8db78fabe14450bcd0621bb425ec622bdae14
MD5 5aba70323a9381727008f5ad031ee2af
BLAKE2b-256 d6b76e828030f0c93038eb3f88947207f30946eaed10f2f3a4ae390fb6d5e26c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 68a897c7ea48fdd597112e5b84974d26c5732b88be23cda4a8f8a467b030e7dc
MD5 6d669f029c9cffc87f9a98ac245164b0
BLAKE2b-256 ce5f5fa1a2a2ab519604ee963df5acb369c2fe87c954c495a681a2e05981034e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 02c4535eedadf88775f54916a2570eafc05941d188d85d1dc15f5cdb306a4284
MD5 ce27ad99c42c57e16ac792b56c30f5fa
BLAKE2b-256 0a81255381e294cb1a0201c18b09e8845e80e0e4fcc39afa9d3ae1f28af9ef8d

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