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

Uploaded Source

Built Distributions

threedigrid_builder-1.11.2-cp311-cp311-win_amd64.whl (625.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.2-cp310-cp310-win_amd64.whl (628.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.2-cp39-cp39-win_amd64.whl (627.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.2-cp38-cp38-win_amd64.whl (623.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.2-cp37-cp37m-win_amd64.whl (622.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.11.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.11.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.11.2.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.11.2.tar.gz
  • Upload date:
  • Size: 150.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for threedigrid-builder-1.11.2.tar.gz
Algorithm Hash digest
SHA256 bd3d5a19faa71d8e739ba04fd60039bfeb199678b91ebfee29080414f017f1c7
MD5 7d3123b74a4cd6d8aa67684957f8db39
BLAKE2b-256 8351d2a2cfa3b33528082f5a5a487d1a2b2de015346c894187b5b21df45c5167

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b469dbc310884b12b64f121393559ce5124a0d597fe4fcb0401f25a538d22540
MD5 4b7660c18e9e46e45ebb55844be85134
BLAKE2b-256 6e244cbe84fbd3daa3264d482208b4feeef98b43b003a40d6df581304e83fcd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a03bcfa5e92566af186155d82988eb510bba3fbe7a2978c3e019bda11cc13086
MD5 a31d954958b6cca23585b5f614a79ff8
BLAKE2b-256 f554944f9db170df223786731e78a48e6e4c0b4a7b17e4ffea92cb197c81ebb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eb0ae4393a5df20f3b75c8c6c033e0f26335b31705d83fb8f82060a254c42773
MD5 b9eef690660719f7cc1403edd1bc1294
BLAKE2b-256 45f89b5ef86693c45542ff6fa334ae6706b35b6cc66d127bffb096919db3a47d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 22190eccdcdc3c25fa1f9946950bf307902c09514faed39e5915163c350e95ee
MD5 302682d137e4414f772e51d5d44af7f6
BLAKE2b-256 09168cf888e731d350616294fdb30be6aa3bd1c9da33d1c5066ae2e1757853d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2aa9152e0c6b644fdefe18e9aac37cbc556d46f62cd1ba40da9b71f90fe637ca
MD5 827008875114c073fab5a684dbf3d63d
BLAKE2b-256 d530f216d9376c2d5ee9eb590ef77e67790c469367376124e48734c2b7eee9c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7ae4a45bc09206febf231ff7983a0648e09e2f0fe681f0329b5af78354c60667
MD5 9f9a6720ede4092b0c6b6f18a0cd5d50
BLAKE2b-256 790cfac1a97524fbccc54691cab87d67020eb2d1d20d4bd8153e290852eb3e30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 216957c8a01aa65a0fecefd98c2f3032d75208799a25dc8f113a820ee611aa1d
MD5 cd44246a2e2dcb04830c32c9590646cc
BLAKE2b-256 f540b9c9579b8a59e2324da97f21557832a1d6b1537f056f2b17088bf4069cbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf5fa37e3aa1cc278607dcc753aa093a0fea968f15de3d651b226ce73ce75314
MD5 9c6dc04b569f07807e0a73881b255dfd
BLAKE2b-256 5a986264ef92877a8d65ba27fa61bf7cf57dd32bf45932c667bb051818c76cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f3aface08fd6850952c51e66098a6e64c7579030775cad645074ff47ce70c61c
MD5 6dd2780533b19e866684f3057bec15f2
BLAKE2b-256 62858268a765a84e24173f464a79b3530bef8fa78d62830aa717b4bb330cf9fd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8daa85416d4b3298efe8f9f6b217bd6ef85d7e8c40725dd912ea5c5560021024
MD5 82eb9fda2cd633872567e1aa6f45fcc4
BLAKE2b-256 68b86b0f1581372a8e076a673aeb1fede9cdcaaa624764af87e28fda01d306f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46e7cb974c9751b35a728011ff4131c44320e0ac353ecace4d026d117b338987
MD5 b2388eabc3b9168a9adb06ce7fbb3b13
BLAKE2b-256 7302f684638bdf0a06278d6571201fc7b67666fcf6ce1136e9b8bf59cb528798

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 54b6928790b645cae87387079e16d99ef503393363849a3632c290a9cdfe3663
MD5 56b6a8fb3213aa62c87c29a071ff4a20
BLAKE2b-256 48dc6f8cb9b769f592aab1c5b7e52c0ba2c3d6b02a7f4d633c2fa560b2f46e61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3ba8d1c36e4f104d1091a7f1a03b0fa90e39e8674074be19c4f37bdc0e5a5dfc
MD5 0a276f18b164d7f2af4acea4f91ec3cf
BLAKE2b-256 0582c33a72fd8d2da9d44be1503724d1cd8090593f077c935d5da28dcafcba5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8de1be96f57ee4ca075a95716a61bf1e3d884044b02616795120ea7bf2fca511
MD5 f62b17821aa221c4fd9b52ede9bfd4c4
BLAKE2b-256 21f1027b726fbe6404baa0ad31fbfadbf19becf2e6c94c4d772551928aa4444f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 99a925b2c9c002e95edbbc73a22c97e36c84c337ecbbd761931d04e5dc160055
MD5 8ac019da87c53c2669d72dbc5d67f175
BLAKE2b-256 fa3d4c26a8bf81c32ef4cf95afc24c510a194f0b0441593ccbd260c519842442

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