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

Uploaded Source

Built Distributions

threedigrid_builder-1.18.0-cp312-cp312-win_amd64.whl (624.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.18.0-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.18.0-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.18.0-cp311-cp311-win_amd64.whl (624.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.18.0-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.18.0-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.18.0-cp310-cp310-win_amd64.whl (626.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.18.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.18.0-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.18.0-cp39-cp39-win_amd64.whl (626.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.18.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.18.0-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.18.0-cp38-cp38-win_amd64.whl (623.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.18.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.18.0-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.18.0.tar.gz.

File metadata

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

File hashes

Hashes for threedigrid_builder-1.18.0.tar.gz
Algorithm Hash digest
SHA256 3ca0f4ba7e011b518758ecd41cfc6dfbf5429f7da295b46500bc6ec33b631ec5
MD5 dce9b6e09f818c042cdf27dbf82d7b90
BLAKE2b-256 c2b6bb87450b633c2220d99b9727d95e3592c8ba90041c107bb1468fe8e7d9fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ab7e12bad3fb745c73a6bbb3f27d9f97463914fb0ebee93ba6792ab7fe0a4ba6
MD5 46f236cf9fa39a2203ad76acf0a35a3a
BLAKE2b-256 3c4c6d991a7ad59cb914dd080dc36faaf06c395b01db398486855f1174b532fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8db4c8e6bea57597ce2f4b39a0d238cdc12aae0312ca414b217ce77d8963846
MD5 3be4de318c22bd151f41b148a8bb3586
BLAKE2b-256 af23a299bbc258db3f193436a0ceb4f887c633c0ec2a0fe8f7ee338a0c5ab5e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4e8ab2ad2005fabe98af5c95b96bd14f22a30071046f0b92e3dd27f83850b9d5
MD5 40797e266617cc53afa07486e6667c51
BLAKE2b-256 0a97938e6947eb0eef1238dd796b29657db922302a29a064a86bef3c24a7b54c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7a4a82e898a886bd1aa1bccd1f1b86afa5c17bb903e0a83b74b2fb33f10af702
MD5 afa3055527f9dbea9376eea91935fde3
BLAKE2b-256 6ec81e30e57b43ae2d5de90a09eb2fbfde709beada219133cab06afb80db3aa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6409ec9195d2a76bfffa78dba267426c5ebb3dea48c73ab633cdf4ab39b6e5b
MD5 dd33e610bfefb69793866e0bfda6c316
BLAKE2b-256 9cfaa5829f6e5c140f81c8c46dba6d4ca33c21fc0c038a5be5f1bf27f37dabc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 99883e6e09f60ddb607136f9d0212e36bcc7af7c91ec499fb95fe9f31ff6f56a
MD5 83e5c68b2bc102a23ccc11ff609a3cd6
BLAKE2b-256 f540bc5a8e79e3d6912d8cb0988aa70cb0415d395382663c7a4ffe22a7754cb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fbea171ae00a36a4158202cd05a39457802d805170a5800574693339f8a11bd2
MD5 5a3fc550ae822930b52f00a95d98bfd3
BLAKE2b-256 6fafe77567c4d1593bd7fd088559a4f8e1cc928431ba932b79248ecfd71956d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d36d620d73346e4a759d19b7b2549dc3677b5fd28f2cc1da1d1f0b7269139d49
MD5 2638b6f109acccbac61b66d2df274c20
BLAKE2b-256 6cfedeb17ea6aa435ab1946f04550f329eb1b5fe28c3218b7142fd2ef40f0f4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4a040f8e4becb5f0ba46b9f663e0b05946df94895f5e631edc0bc05d410ab805
MD5 98b875c2b471dc5229739d1ee3e2782b
BLAKE2b-256 8b179511c325bbd3a5730cba78afd0233858695395a3c69d946e98d3b329a480

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d51c467638062958596bc3d28a1ac0d23ca8708f9858774fe9c4a3239d1fd939
MD5 ee33ae9cd43635d52a470c63d97bdc76
BLAKE2b-256 4f27fde153dd7cdd54bfc8f5db4c1f6ffe736892a0d95c6cb4e06ef2e88265f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7331c3d1641c5d58ed929ec79eff97eeb9b14361a61952a46ebbeaabea9a5e5
MD5 0f935a022792e94c4b3ac67f6602dfcf
BLAKE2b-256 dce18428c2c45dd7921eb53470215f975900cad19bdff57985eb78e863595dc1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7a1f53fe8f6f965c22aff3c3362d3197d26a35d8706675bf48beffb2f5461fa3
MD5 8b26d4bc3ddf987d442493db27fdcc5c
BLAKE2b-256 76f05603d38588acd16e1c6f81d0b99f74cadbd97be90af3fb967e879eb46eaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2c8706e63b7692b997e82f235d18fdb1fb9f17fa96dafaa3e1555d7bacb15275
MD5 43b872a42461dc151db685ef5824fb47
BLAKE2b-256 a90ee7657cf3f5be615a6b167271835995f1246fb5b8f0dfe3cd29c4e6871d2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77c1d6745e6842c10869f27397550deaace61b5159f76fc23a333cb4a4414685
MD5 006106e6cee96720727f34b8a6c9f118
BLAKE2b-256 d00119857fb27e0076edf579922ca38d78d0610bbafc829fe21ea80b2b63d10b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.18.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 db6cc49b8a3f80566de9e5bb7c9f3bda725848a05d15be729a9320f4fb990a0d
MD5 461c893e5e372fbfcfe247e84e84fbfd
BLAKE2b-256 6b6cde2c8aa4773b98f1914fd03ffa3edf76bc61365a804f6313b4acab0b3678

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