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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.19.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.19.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.19.0-cp311-cp311-win_amd64.whl (624.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.19.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.19.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.19.0-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.19.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.19.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.19.0-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.19.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.19.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.19.0-cp38-cp38-win_amd64.whl (623.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.19.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.19.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.19.0.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.19.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c7588067f386013ee725e29d9444a4f808b4aead031e08d8cae1d0e28db39773
MD5 f10a94bb3d4b0a0c7900033dc3fa52dc
BLAKE2b-256 429e17f3a7ca9505d0165b97a5fc4f16ab086327373e42b9c48c28ffc06dd33d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d196a27ff8798d1ad95b687f622db424f8d1efddd36bb51328aab56098eaf2b3
MD5 935a0706d36b387ec46fdbc079b65846
BLAKE2b-256 3aadea92c3cfedd4d2ed79b42d0f4a8511924a6a72575d74e580483dbb51a78e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b69567d03d53dd28471257263cb0feb09483df61a19bff54bc87bc41e0d71133
MD5 1fdac7c6cfd35afc90b9d27a09d3662b
BLAKE2b-256 8d122ec215861b10790aab5b01e95df4ff750124cde6616678f6272cb5c0566c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5e52b9168a3bbdcd7621a192ab5a1a92522651b501707d52f7ceaa66865dd375
MD5 c62f318d93bb470fb758c2cfa2543cb2
BLAKE2b-256 7ab7a2172c8eb1dd16f4b46ceb899ccaf19fb15f8e378c1b0b0bcdbfdcad5e78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1f30759385fedec5ff8bf054fdda46a57eff422b1b39ba863541ac6ac3b83d1e
MD5 31497499c7f4cc849599d88d48355347
BLAKE2b-256 8856794b5a96276cd96cb2a0dc7b4b3e7678fea2593548cef20dae390d9efc65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21c106880ad9d903487da9be2b8174fb1543a9454b0f87c5dc749f5a4384a8c2
MD5 79c49564185df0c0857c0b93d1beab38
BLAKE2b-256 49fb14606d4cd62745374d6c01a5ecfa9e7a7af870ac90e6343ff2e8296157ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c7854b6abf7d53cfb9bb8b52842b1cc9932c0210d6088d22f3fd6332d5abf907
MD5 11856e9cd53a1552d54ed479e7ed4c9a
BLAKE2b-256 e5eda84a70624bf9129a1607ea8b05f55936d966b14ce63e6cacb7863d0eea5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3d6bb1760373446a8ef3b3dfac82625b1101c5c24154a988589a2dcf49d08709
MD5 3afe67cfc52bf1a1576d3db92cdc7662
BLAKE2b-256 408fff29de1623c6b76e4b24df9da8f00401f9f49febb0b51704ee698874b551

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 00a71bba7cb252f7d944db983109322221ed5527718fdd1cfd389f47e6bb9436
MD5 ed8bd1bfc596c247ea44290126dae8d6
BLAKE2b-256 6300fead5ad2c328d152f5b32e636162c388422c92409303b22fadea0503b9d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b56984cd5a1d0a7ea085e803745db0dbd972db295554916d080067e747e24d1
MD5 7315fa37b67b3917199e394473607088
BLAKE2b-256 d0e3fd680592aec7d09ce917848af8aec0217cc8206fe49e4fd1b0676c9dda1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c208e2f82640da4d5ad813466b3ac7600147e485b6072ced8f321c6a2ce00c7e
MD5 db4f855c9d573c977cdacc8cfe7f1b1c
BLAKE2b-256 c4b07e44ffe5d0f20cac9c5596fb746130af7ced4be213d7af144518896feb76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35c477ba31de6f9b96337add82d2256ac818376095ffbbad9fef64429f242a13
MD5 8e5681ab23ef888921a1fc73dda26bb2
BLAKE2b-256 cd23407335bbbcff42bdc720c16e9a53cc02a0e00bd793e40f77ac137b5ebffa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 81547323137847c2071a18f47cb12a29dec7c2217ac8cceea3a8f1aa34371096
MD5 c4b88378c590c53fb7196c9c4a5fc25b
BLAKE2b-256 35c491ec3095ab2be5d2de613b80be5f0da2c7bdbb9d8cde5aa7656461a6b294

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1d03c5185bb2fca1ffb39ae88ddfdc50d30c2dc575e192a8e0487a362935ddca
MD5 626302a94069ba527ecc2f2f89aa39f5
BLAKE2b-256 6180105105709ef46fa7830489446a8c519b5c8a6109266f157e1914d4561c8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e03ac4f7285a31603835d62adc78dc9f1294c645eb9b0770b67d6fbfa310077
MD5 e8cca4651c94ff15f960b67bf12ed425
BLAKE2b-256 f1437e124fe00ab548217d37d746b68b06dda00cf7718176b03aedb5ff82d588

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.19.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 edbc250f4960acfb170d9ddc89b112aacf32044667416276176de5e21fb28b80
MD5 e1aae6ba99fc47e1cd1826810b7b2693
BLAKE2b-256 a6afba6f8c7ef1e20b2391f428973860e76acf0e3faf85c4f6ca1350566e6027

See more details on using hashes here.

Supported by

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