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.17.0.dev0.tar.gz (154.2 kB view details)

Uploaded Source

Built Distributions

threedigrid_builder-1.17.0.dev0-cp312-cp312-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.17.0.dev0-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.17.0.dev0-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.17.0.dev0-cp311-cp311-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.17.0.dev0-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.17.0.dev0-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.17.0.dev0-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.17.0.dev0-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.17.0.dev0-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.17.0.dev0-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.17.0.dev0-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.17.0.dev0-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.17.0.dev0-cp38-cp38-win_amd64.whl (623.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.17.0.dev0-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.17.0.dev0-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.17.0.dev0.tar.gz.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0.tar.gz
Algorithm Hash digest
SHA256 302a18f4f32882b8c8915023370d1aa22490f3a31d1ab685ca9b8e59bed55de7
MD5 d1a871e35e14f36139091fa3dd5ebe12
BLAKE2b-256 a576e425ba7e93d6f2c2f08ef1d83f07d5ff9dd95b87105bdee48ca0aebc2019

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 38bc36752618013dc3879b9b4edd473d24abd9c240311e6efcafff280f0cc33e
MD5 1ebd5c0a2b4c99888530caac9d7dc9b7
BLAKE2b-256 b4e91750eb7fb9729bba907d349b6bb0219652f6d891d64194657c1a73a1e836

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ea79b51b10c7fea1f1361b101c1badb8304c7bd7623f8aa005dcfd4f8cb767f
MD5 c25c0ce9babd1caebd5e0fe7ba5f5d09
BLAKE2b-256 f04696f797859adc52a5286187e4ee7b7f17f675bbee8c58a4a5a6f3fcc43a9c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 48d2b76011532ea09fd5a6bc4ab09692256529e86ca3c10c06bfecd275dc30f3
MD5 43b4a3a305c03cf2dc69f5151f3444e7
BLAKE2b-256 7476df8e6ec1ec4ea92d8f2dd744f88deaae927fd394226ad291002b4c3d94d4

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 078be5afc2c9815ea9da15565c2815e77dca282247eb659f1baf523ea2818d6a
MD5 600489c20bbd969f9124eb7b25da724c
BLAKE2b-256 beab2d33571b4f17cf4b9180138bc199beefe8592106b9d44b79232cd8bac04a

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5227f4f408f35aa1d255c21e02b9ae74c1760c515f1faf561b5d3ef0047c8bc2
MD5 a8650f0f27f676a6ffa4d8417834517a
BLAKE2b-256 6a149cd71fdd2603607455ef283e447421eef997a646dcb68145341dc3a8d12f

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 05c8bb82bab99e9715bb291922cec099d6d9b74c679929cab661a7b3fb3c1c23
MD5 8a8330b5609cae02ad32446a0018fcf8
BLAKE2b-256 b7550a3b7b65325af011ab9bae18dc8e426610eadade3410780192c08a218138

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 77269e8eaae389e04a785ff3eb5801aff7b6fb962ab657e05df3410b123e8734
MD5 4d3831d611c77d7a130f5818092dde1d
BLAKE2b-256 8f2f2c8aa8cd3f82fc7100a6c7f881d25b9eb5fac5fce0d493dfe9209e069a0a

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ca7125985e85176f54e3aa8ab6e1ea554febcff6da91ecf7f0130460ce1db294
MD5 604a78dbba61fc674c6563b89a3e8693
BLAKE2b-256 498995b4096d55c98b6847f1866a80fb169195cf512707d9f05c6a4aa5938302

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 469eb6c9ca49e25eab0c28b4c968031c5b4117111a3fe3452a00bd48dbd0b166
MD5 eeb87a5e0c590aa6e8eae2432454e109
BLAKE2b-256 19db003eaa6e52652427c2894c6b15f971108973af8f18c67419f1e77ef8fb23

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 646821e7cef0e826c4bb315df09ef7defdaeafa0185335400ece7ec276842643
MD5 3cf55b5085db89663f96174ab7ad6cb7
BLAKE2b-256 fedf20852beadfbf18b6e49d449bd7bb908f43ebb9ddd5f1fbb6e74c18b0d3ee

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0df3d3c35c04e0e7e569d25b080f46621aab93273486ed35940fb16bf8ac16c
MD5 3c651814238fd5d6070669bb148e02ea
BLAKE2b-256 0ca0305f1034de4d9cc270d9f41f9c39221c422582d227434b06e80e8ccd4309

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f769ff4d25c4010df26fa5d83c643d62e46164bb309efd44f0f960affe56f149
MD5 aa69246b751f544c0520c3415529c122
BLAKE2b-256 41e8070fb5358aa8aae926e95cdbef8bf953bd8da2cec845f8e4b9bf736da527

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d4e4936976556947a52c9302493b1abdf8b0d80bce95b1eca89802cc1fbdc9fe
MD5 f83a8c491b0eb8350ba1b4162035eadd
BLAKE2b-256 c8a32cc946612034700e3701c0315eb9c627d2c2126c6cb35cf7e70e8507b583

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf3a6dcb89b9ba28b9dc93342d885264caf5a43b22cfb21abf0438398912934f
MD5 a476b308b29658cd82f4f22f0c7c69ac
BLAKE2b-256 717761507b42fa5b2e58e1dfc0158ff3abe8a63b3a82b9e60c76a97eef99b5af

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 86849da33b9d4f816532bc75fbcb14d135d8e6d14b5984acb803383089421f03
MD5 d73a5a5437d24d34301357d1ad68948e
BLAKE2b-256 84d449b9d420979e1c8df2f9565243db42820d6bd2d9ef95c567c20e86e4a637

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