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

Uploaded Source

Built Distributions

threedigrid_builder-1.19.1-cp312-cp312-win_amd64.whl (624.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.19.1-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.19.1-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.19.1-cp311-cp311-win_amd64.whl (624.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.19.1-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.19.1-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.19.1-cp310-cp310-win_amd64.whl (626.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.19.1-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.19.1-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.19.1-cp39-cp39-win_amd64.whl (626.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.19.1-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.19.1-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.19.1-cp38-cp38-win_amd64.whl (623.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.19.1-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.19.1-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.19.1.tar.gz.

File metadata

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

File hashes

Hashes for threedigrid_builder-1.19.1.tar.gz
Algorithm Hash digest
SHA256 e622711a0532705d904f0ebb5f3859ba95bff8ab15eb53718d598f8394288f76
MD5 97af12aa95f3fcbf12f39d7a6768904b
BLAKE2b-256 40d0e1b43c3449bd1a10ec9f49b8d10eb93b4acaac20e906c8bf18e0facb97f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1f8209ff36f1aaf77788e7a0bc9a5c09b1df6cb43ff5839108bc6108778da0a9
MD5 4f02e8c47de938fd67775ec43e350b0e
BLAKE2b-256 c3bd04a565bbfa2f27118bfcd7fe5c9162a37cd89f40b525563402f6491a9d7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 902259770b8346ac9cbc23136d89ded1753ab44b07a8180092ec77be1f441baf
MD5 a97391c0a7dd9591391e07912b9bf0fa
BLAKE2b-256 1b843bec1628a503dfa3bfad26bf4721cc9c197a10cd2c54bd10aa347f992f9e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f0db84ee3b17d7278b74ca080ab04d78cd9554ee0701eb8a6ae3176d1ec8003c
MD5 62f5ce75aa46bf96f0cfefbcf09014b8
BLAKE2b-256 7f67715e3190014781d0cb6871cbc67dce3b62a69815c3b6235e924e458b03f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 31cee5aaa45b7d78337811da49f98fff16ce206c42b47520f9a8af2b66eef9a3
MD5 ea622207aa7fc1c17297d7929eac0f84
BLAKE2b-256 16e8b163efcc2c9bfd9ac31e9aa7501e0d9be5b09440db8721d17b6b3d50bfa8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0f3353a468d3a5f9461a4dd34539ce41389cc24bd02d0efc494afc971d3132fb
MD5 b5b647fb3d1f1d3c28bf69b3f52f97b5
BLAKE2b-256 325ebe18b8a6a644b15461b76737a6d1745640bee2704c12306cba4028d95257

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bca74505766b8f5b6a77bd0e220811e14940ed4b9bc7cbe55ca5b7925f8a564e
MD5 7993cd5e5e6a76f40f7de74cd26c7eba
BLAKE2b-256 cedac7668e8722da10cb7649c5e90f0069e4ff8805a8551dfb317acf7086df0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 76390bb4ff5bb965507c04fffbd14aa72e7867a0873cf591cfe79e7a213e35af
MD5 4144fa5ab05bf60395e4584ba6a825bd
BLAKE2b-256 c0ddd24894149f32cee68c6593328fdda2b55f96dc232f519cc2d9650e2fba49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 05176e059638f369f4f5713c8549465a29b6461ba27426cb180c879ddca93eec
MD5 b4db2c769cf603387f6ab9f189b4d3b9
BLAKE2b-256 1d17c5eed9f63cc8ab05936f34086f9cf44f37a5cb7ce0a53f851a0a49c8b609

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7379e3a7e3fe158ba21ad700d28e99e7009f3f03096269b154a1fb6c96838c90
MD5 01731933613417e0850f7625340f6c9b
BLAKE2b-256 558c54c6d2aedb73a5a3a5542e76128dbb3285cbe310aab7e25bf0fa8a8edb0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bb7db9b75b3651598b19ec66576331a21c5d017c56a686526a1d047f29c7c43f
MD5 28ddb1962b03345428e2e2486c5f6200
BLAKE2b-256 1b33da340fff4fe75a2cb38265c26c840398c0fe116d7b295decd2e09cc51bf8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4a64e17c443bb8df29041c9edd601aadcb7326fcf7f93d9c6a55b530369c88ad
MD5 5bfeb4840d6e55aa2186ca58d155c818
BLAKE2b-256 56aba68dd912b2a23d6e4228f70878ffa916978fec9238acd43fef2717e2363c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7db7cf0096ccc70c70e0b6bcbeb2c059cbd2b87ae4da2b218c79f09eac083e5a
MD5 a6799aad6e877a9d63421b39d8333787
BLAKE2b-256 07fd7a79386c8885a7af6fd8d421dca6b5a8939bfc82834a56eb93390ca1a075

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f7d926eae5ab95e7d9252604c6132e681c20b59eac8f86593a2d665ec93c2725
MD5 7df4a239d0cf883b747c97819f98bf84
BLAKE2b-256 fa5f7c6d9f5e7933f676e358e287aeacac22373a4ca321b2192cab02ca71eb53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61a2204184166d43793e8e7d97f012fa6988baf6e45ff9ee5830713c59cad9fd
MD5 8e3d1a29587ecfe1b7aea8e1afd346a1
BLAKE2b-256 42f407488e4275ce62e11c4bfe90d2ccf9c1539a8b4a124cc7fb5985cfa45797

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 41c1357c83230a43a5e95331f9547dacc2d3e6e90f7e5d6b552ac20e489ba0e8
MD5 5a6a8494468030314226922791b5f547
BLAKE2b-256 81dcb5c1616b42371fc4b7231307626e6261407cc55570f7e9706ca1998d0846

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