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

Uploaded Source

Built Distributions

threedigrid_builder-1.15.0-cp312-cp312-win_amd64.whl (618.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.15.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.15.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.15.0-cp311-cp311-win_amd64.whl (618.7 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.15.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.15.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.15.0-cp310-cp310-win_amd64.whl (619.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.15.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.15.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.15.0-cp39-cp39-win_amd64.whl (620.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.15.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.15.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.15.0-cp38-cp38-win_amd64.whl (617.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.15.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.15.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.15.0.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.15.0.tar.gz
  • Upload date:
  • Size: 152.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for threedigrid_builder-1.15.0.tar.gz
Algorithm Hash digest
SHA256 efb1a9f337b7aa9b6e9074cf2201978c2898ed153fb03cbbd69aa92ffbe2ae55
MD5 76fa65931e11a54d46eb2d17062ec743
BLAKE2b-256 9f8d8450c360f6f0455b968c794d83a68430db39203efeee9c5ab02f7dd23de6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 97e54c3b99340b6a826dab483808e13f499ba88f79bc59f7c7d5706843ccdb3e
MD5 ecd32a4de64e3b5fe66c4ce8fc2fb5e6
BLAKE2b-256 ce70ce3536ea59132e7bd7b844877ad00f8ee4fd34edd70ac6b51b6056e4c3df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 556a4c1ff885f24c4f83cc6ece05c31623c17ed9a7ce66793af0d9a1c91fba55
MD5 d04e42fe16420be38ad4185575d68955
BLAKE2b-256 a0b49d23efdd8f832e7135fde92e93460b450c6bf7191a13bab5e9a751e2cceb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8245213daad202a6691b6f96b80cf15239b74b980ba9e0b47b69699ef2e25d15
MD5 a80a58e5cff8b916ac5207034cff3fe5
BLAKE2b-256 91c704e15b5271bf5e04a1ee9c963b67854fc8f8265b78bdfa73427a30b549ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fda6d7c14d41f9559e0bcdcce08d450f9067156e46aeaa34de8d10346ea9e82a
MD5 f33f00e16ab5cbf1388d13f5788dc0aa
BLAKE2b-256 7d68a5b2fa4f17bd6caa1677fef11ed031dc6c0d4702c05d769689a5a35c3370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9603a0efdb68219114fca6aa539e03a9179826bc440aff667d6c3a328d5f402b
MD5 c8a74fa43118436c4ff672b9c846a0ef
BLAKE2b-256 fe83fe10af9686f14d81db05575b0111c10738b59d745f34fdf24475166f6bd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 109a4a3687975761cffc9997af8a8a0a1e91a2badd346f5fc6f40c3a11a2b949
MD5 d67580fe7099019005735aa4946529b9
BLAKE2b-256 d18e3cef94066d9e43bd43bffa0989d4325444dd817d592559ba1205ec23e785

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c16b1e17168bcb61764a2fee6d2bf386d9ef43ad7b3ece3820f5f4c09e881b92
MD5 28a5e458bf13263811fd8cf552345c8a
BLAKE2b-256 4ea90d2e18b049adf2a8d755a3f0ea2d61162fa8d923651d7ce9fe7c25dbe27b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26e0cd774ebe7e636e3564dbf6368f8d8f676deb86b931bd1dc972f0b2f050cb
MD5 815f4b30007d2ae1de3f0c6e268beead
BLAKE2b-256 08ab2b22985a3abac15b488e7239d7c33f7ce3d342914179e1e1b9d2249f1ccc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 be5e63226e732cf390871c9e56fbc907dd7c09d9070b88fbc54d15e21d5b8fae
MD5 7cb290dcf5ca64a31cfdf6b0c65fc476
BLAKE2b-256 f0d07d9f3b3df4f3351da6231ac84126717aef1e0e5b3f42f92cdfba88d38013

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a1fdf4736cb821436d7b24c83b3ba9aae3d1e67dd578c04971b4bdc5c86b31bd
MD5 177a953f961a38d3980eda1103d7ba47
BLAKE2b-256 67d1529afd0b73f5d23249fe9132716586956f5270a03500a71ac4f0904a9d55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9481a0528ffcc7b3f129b1204e92030a6de979ee8fc2adc75f6ceea4882bf67e
MD5 2c32efeab196dde7cfaf070dd81d4ee2
BLAKE2b-256 77176ef69d80d4f531145f2c81ecfd2f6608ae9f7e2d9b83dce47d32ab99c911

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c678b2caf283bdd490cc586f003286f9988f12851dd2221d68b46b35eaffd37d
MD5 7ff27a9908553e43d8a73919b925a0dd
BLAKE2b-256 a951e35f9bfac44857aa9558dce936d79244c985cc4e498fd4c8de6fca9b6b2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a3c5710fb14fdb43a55dbb96e73c77254672f046491cc29439d7c206eb335cc8
MD5 388beefa04ab9957d495f85a2c877369
BLAKE2b-256 3d6ce049d52af0fa775a5ad0721aca52ec8ac1561b3c3302f248c711df1d869d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aac7da91ad9c07a9416ab295137a72fe551143ef4658c2db97c24afc7f698311
MD5 9f9361f139ad056e296daee0ca4560eb
BLAKE2b-256 5126ae93e07c96d8956d51d224fe8174915af86cd76b8997955780c1b9ec1d70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e9a47d53d8350493c7cefb010549db6de149cbd75a4937ad6958e11ca67fade1
MD5 5db150366cc9c6f3d344f0e5a85e218e
BLAKE2b-256 a478ee40579e5f7be41c620777f8eaa63ad04e5258e2fa1bf51c684562e8762c

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