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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded CPython 3.12Windows x86-64

threedigrid_builder-1.17.0.dev3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.0.dev3-cp312-cp312-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

threedigrid_builder-1.17.0.dev3-cp311-cp311-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.11Windows x86-64

threedigrid_builder-1.17.0.dev3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.0.dev3-cp311-cp311-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

threedigrid_builder-1.17.0.dev3-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10Windows x86-64

threedigrid_builder-1.17.0.dev3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.0.dev3-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

threedigrid_builder-1.17.0.dev3-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9Windows x86-64

threedigrid_builder-1.17.0.dev3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.0.dev3-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

threedigrid_builder-1.17.0.dev3-cp38-cp38-win_amd64.whl (623.4 kB view details)

Uploaded CPython 3.8Windows x86-64

threedigrid_builder-1.17.0.dev3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.17.0.dev3-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file threedigrid_builder-1.17.0.dev3.tar.gz.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3.tar.gz
Algorithm Hash digest
SHA256 4c1336ebae9644a529a3f5071a8dc525237dd07a3e2a54153b3a36c63b94da61
MD5 3c34b0bb71c59cdd360440ab8184067a
BLAKE2b-256 857686956a7b0a07d7fb18fd20ae12a563d6fc05ce0b5d351eaa30254df2756e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2d3b9845bd854d62e3d45a094663c3737f888067e67c047429e740ba015c5e0d
MD5 be4775b309e87d25d5ca74414c67560a
BLAKE2b-256 86199267292aa041421bdfb19fd91391b1db4bb550e409d800ba20dc6f5a087c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f56156436386162b081c784e29fb32e9c2d0f2951cb93ff757ab96cd7026eca0
MD5 139fb80fef8cde1913eb75aae3164e2e
BLAKE2b-256 9f3a731e18f08db022f2692335fa0f597211a7f8d68b6446b689e1ffe7730a40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 52ee3aef3680253e83418564dd2062341bd3266fe79b6d9917c35e16da4795bf
MD5 6b8b4a3ed54ea68457870f817c83d260
BLAKE2b-256 7ee7a06a5ae7dc5bfb87e49af2695f99d102fa71f01ab05bb56732d919c11f61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1d726be7d7f9ec9ab27419c5d110dc9f8bd6f6ab62ec9ac648f9b30e8a72e1c5
MD5 c1ab2186cdb38c1dfdf0c3ecc908fa4f
BLAKE2b-256 926987dc47e9e1ce3c5724a34ef3287d637f094bf3fd27517a9ba64dafc42ba2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85be1b2913ef6f643b2f174425bb9e8bfb61ee7c422055fd43c22e1a4da00422
MD5 c26afca172dca4a907fb9af78896e978
BLAKE2b-256 b7697aa690e06a85ae6eeb820f633bc1b93b7c65ad36547c21a4263f7bd06e47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e82c7065ef386035bf2e697878a95c41d2c06060adb02bf882907b3f35ac75de
MD5 3573c50f0170b37be85d0115ce93f7b4
BLAKE2b-256 5e9d54a6ee7ade282cda6c152661f20ede6e1eae13ccdbdff13eb9d44d77a831

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 914fb088e7f3cf0a1c785c19507667fe5f42d612d73ac5b4a3322a5798dd079a
MD5 ae12d60298d8341ed8108bab5e1d5f7c
BLAKE2b-256 ff827bc6a1d13e5bf0090ac5a68254d1752f9f7561149558e36251b0453ca52f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b42d13a96422d932bfeee47fa9e5e5d75565a329534b691247c17f3fa8193897
MD5 6e40b925438c407413f737ccd4527ffd
BLAKE2b-256 a4dd5c008f80a1a1b345239f8ac3350eccf7750b867921d7fe1c08c310a6b61b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c467ce26a1ace65140d54703b755f25a830a24bad147f66c9298b4a9c70aa0c
MD5 759d26725337066f6338308e60f37e5d
BLAKE2b-256 e7864d11a6d44dee6c0f7661bc9ade5d08c7a868ee1b05f05f6c658e09dbec8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bd50641767d1e69793939ee5dac455ec4fa3120f1c0e08ec8d132960c35bfa0d
MD5 ec59fcd8036c3bf82319981e2fae9c26
BLAKE2b-256 ed54f255ac212c56fc1b6692581f346f9113f92b3f755de4511c14337f3b2eb7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c4bee6ed4c94995f026c4f30f451cc30d3fe702f8b9bd4281efdbf8843cfe2a
MD5 181e4fa97aebf3d056e860869c5ea2e1
BLAKE2b-256 7ab0b7a4de2a7c2c021e43af94ba89e82de710641b641295288c0e7540588a58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c28708b10578ba859354e22fbd1da6c8855fca9fcd28019d09a066a340824909
MD5 d374ce2088b7bee0133e58c32b08d154
BLAKE2b-256 896f9acd4c1ae2f48f42a952d1fa8f205abbd212cbf839ad93f0af9c0c3f0603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 813003ebdc030fc247ca9881fc7197e57b729bde12b54d4e0fb6e01d319ac7fe
MD5 0adf0c08d83eb096d759440e5874b0c8
BLAKE2b-256 23c75edff51768d7bb2697ee306bbb4281a1526d5fb77f774193fc7d06f20e47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be867a770f335243c0e74360a0b2519133798fdddf0e1f84d695d257636161ed
MD5 ebc4ba65a53666ba064809ae8a4915e7
BLAKE2b-256 eebe55e313f9b953fddfbe316489c2d818a6dc40e055372dbb2cbf9c8599d4ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 576390f4255beb632f83a48cc26cf9bd143a7c72d64fd460cbf167cfd8a7eb84
MD5 d64bbf2b98b87e467cfc95161ea1a31e
BLAKE2b-256 45b84ee5e4d69042ba6f5a4baa3ff243d4b7d183e3b449faefe000787d7d836c

See more details on using hashes here.

Supported by

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