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

Uploaded Source

Built Distributions

threedigrid_builder-1.5.0-cp310-cp310-win_amd64.whl (622.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.5.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.5.0-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

threedigrid_builder-1.5.0-cp39-cp39-win_amd64.whl (621.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.5.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.5.0-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

threedigrid_builder-1.5.0-cp38-cp38-win_amd64.whl (617.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.5.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.5.0-cp38-cp38-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.5.0-cp37-cp37m-win_amd64.whl (616.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.5.0-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.5.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file threedigrid-builder-1.5.0.tar.gz.

File metadata

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

File hashes

Hashes for threedigrid-builder-1.5.0.tar.gz
Algorithm Hash digest
SHA256 fc9dcd96b0f37eb6e9399933dcb2b531707b27d7ea25272540a4782bd036ebcf
MD5 a4f794ce6a4bd85898a271169f640a04
BLAKE2b-256 0a4788e466833a9c82262d8737c28c27b4c2c47fa09962b985427674f9a4bfb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c3224e423289c95c33fbb6b8da45f43efb7936a7750f35e94fc45f021b4ebef8
MD5 ee0f25d85f5e8cb73b7b11c3e33c7120
BLAKE2b-256 3577ef0e14693d07f5b93ebc7a69295c179fb561aa18456f76fe2c50ad4d1ecb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fbb490b143a6c62e8c9c674b112cd80b1baef9c1bba538961ac43bcef46f6d01
MD5 b5cdccda54874e444319a72b407231ff
BLAKE2b-256 3fbc5d349600a415ff0246a322a0bc3b4daf257d6f0b1ba1f1839b29f8b8f08f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a1e0b80f34e66c9fd89da1d9d6881225a5ebb4e5abc6651e189ac8e8a41aeac1
MD5 0683fd08904168689205fc72d0c0d964
BLAKE2b-256 260f8c121f369946cf0f487ef226f96cdfcee071db85307b0ec29286ca4820da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5abf8d5fa63bf9d50d27d4d4eac53c06b4f0fa07c244cfd43f6d56bfb3ac9c41
MD5 db407020a847d438080f412f5a3d7041
BLAKE2b-256 c637ffafb888d218626cfbfe39ab346e5aac13db76788da85fc5c657b461f5c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 86718b68628cf4d6304ad937b3400e6e427fb3785746997a85acc270c94b6812
MD5 b59f4de527e9b227e59f7338bffad9db
BLAKE2b-256 777b117fcfe0443650461cdd720b29a6adfaf3f6ed566fadd93d5761b3441740

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ee9d9fd284b71e0a4f4ccc9be6257cdfc5e11dc08060846eae754015d14d0eb
MD5 f7fcc6532db96bf5e0d401cdaeee10bb
BLAKE2b-256 ee2a8d051bca14fb22fb85421495f425b351999153ced17b7d3fbd47694d80fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3362aa73c4d7d14937d958cca8237db7ec9f4a147da98c84b2721c313184295c
MD5 266a9cc3a4c04a7fc7d8a9175f7e2152
BLAKE2b-256 84f890a99430a4f8a5a69aebd9e5a55b971c95029edd36ede376d851257a960f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d64a74aba1660b1875db341327213bbd3b5c6cfb3dd464b523b56b28fe079d71
MD5 a5b2e12295a801ace0a4a24413177bdb
BLAKE2b-256 11cd292a7e6f23f89d452f50de0cc7045e09277ed360d3b12ddb400fedb78d05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9cfba94e5f059ad96f6b080c053c1171a2b3fecbc68cbcd04c4bc78cb88d2d5e
MD5 d92b300986c357dcbf0d29b470acb12b
BLAKE2b-256 3e147087637da772ed36530ea936f08a27c155f9a305b89cc00ec56c42a965aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6c1eacf125737f8a67bbd8bdf879ff90c0b2cd99d6ae24f0a9e582eac90f5279
MD5 9b3f382adf116ba80b084fb2aea8b4a4
BLAKE2b-256 caeceb02b14bd29e3ab34ad80aa7543f4fedae235c4932f8ec44822f6e61e492

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a87fdb496d2356015a92aa16c2fe07fb8c20b6d9dbdebb13dab23a05d8b86d65
MD5 24fb2523886c0be6fb0a918afa92f042
BLAKE2b-256 8cc17fbae53b6fb55cb22e4b976839aeccd948d5f225128d14e9d716c90bf6e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.5.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f2ca8d26c2b9cd6ad79eb870a2b75f1c86d198029b41183e85020ac38ad31e54
MD5 f7d4ee324393d4616c6855be70dbc1e7
BLAKE2b-256 d97563b250ba1de753b688f0250395580d183a677b622e7b1991ff73ebecceb9

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