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

Uploaded Source

Built Distributions

threedigrid_builder-1.14.0-cp312-cp312-win_amd64.whl (618.0 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.14.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.14.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.14.0-cp311-cp311-win_amd64.whl (618.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.14.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.14.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.14.0-cp310-cp310-win_amd64.whl (619.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.14.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.14.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.14.0-cp39-cp39-win_amd64.whl (619.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.14.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.14.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.14.0-cp38-cp38-win_amd64.whl (616.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.14.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.14.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.14.0.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.14.0.tar.gz
  • Upload date:
  • Size: 151.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for threedigrid-builder-1.14.0.tar.gz
Algorithm Hash digest
SHA256 da763adbf01c0eab156bfd6b62c18b806b0c0a295b14aef532a55b95b8942eb7
MD5 79af2a5a431bd31ac071b45f4cc2cddb
BLAKE2b-256 9d5ec63175c156ef02d59bc00eda526f516c1000d6b7e5b436fedaf512e00808

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fbca953a19c48e4c3e0d873ce6ec530803e2fb810a94918d39204bcd4c412a99
MD5 507d655f515b140725a4c866cc68318a
BLAKE2b-256 2918d3e1dba673d2a5a47fc128a32fd758d3d7c40141628e6be18e3492fb1a12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f21cd455c18ed17150c2daf07d9a656f276d952b24373e6dbf32eda6c9d451ac
MD5 2836ffdbd19717f84ec8a01c86fbbbde
BLAKE2b-256 ef0329942e54d6c33c9192ceab7b1416e6374b3aeee9b7fe23755b57d36d3d99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 39ad1f16a3a284569a969d3954f3fb8b088330016e7f88f842a0aa41a4770fab
MD5 c1bfb06f038f1fac733d5a83e845502c
BLAKE2b-256 aa19cb2c56b8f8250ee86c29727cd22652a8f345ec26397d7bb4aa2eea4d6a7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cfccad13ef971238393084c44ff3517f80cfda786241e8027723e422ef0d6ead
MD5 5a0f49cc62d198c1e2f3a0c3d8a10105
BLAKE2b-256 3b69790ad8782a82a9a775216945f14277c4202516d37147a14c726da0784cc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a8bd4805d8868b56745413a703783a1f17e9519ba281f77d16e7d7e73db5d2ae
MD5 5bd0a4ae3d16ef19c898510519ef7982
BLAKE2b-256 2acceefa86358f499307a8b811748d3595c6c76e99a8490dc6b9848ef81264b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 488a8e8104b4e18c2de3462c429fefaea33e7f834bb6ab0fe17f45da86abd639
MD5 be2438f4b95a2c5b43156333aadb6823
BLAKE2b-256 a964ec86e8deacccd02ce5ef8c89b6bdc496ddf930b01e99719228edcfb0a712

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5258f9c63f5898df94142e9625ad264eaf91d03bc2689edeed047d131532a477
MD5 417a2d23ffca4e8ccbfac7177eb6a163
BLAKE2b-256 d339a1963bce4ef433a977a60ac49e687421760b55430685cee773c22f25530b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9402889900ba6024f780854103666a3b896170de4e1793d14badef6b55f161dc
MD5 ee9a7a257e6a764e0c4713b182ed03e8
BLAKE2b-256 9e29017c65ecbda6aa4b4885b2c248de82cf88131e85ef5a47a7ec38769d0426

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 45256b0243b9063a54ab086cb41a54e3d65718338dad85d905326d44a604c4c0
MD5 471009bfaf0fa859cec0058a2104ad06
BLAKE2b-256 ab94ad5e70e58797830dd080e6b494c860411f4a9e2c4e8502aa74b4f8eb56d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9a8f02cb3bc3bdd91d0d972fcf2f1449107df8b185ee1133c7f1b8f3e7008610
MD5 823313959eef37056d25ed88581b09cd
BLAKE2b-256 0e73a787f2a8103bd93362311723a29a30f16d74aafcf46ef66f580d049f21c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fb14e886226f554ebdb9822313eddc42757f6f0bef521112d9d5d6e142bf8f60
MD5 441e810d3fdb7d2829048511b6b53d9b
BLAKE2b-256 14cc461073a99764003685525a0ba512e39aa5cc684a7c2a3193ae58d4fc26cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b3c5a5921302ada8ebb03ecfdfd7a64692674f066f8f6d727ccd9e650274004
MD5 d3fb767c4ca009689a40dc124cd4042a
BLAKE2b-256 47646d495cad7b35ba517b73fb6f49819fb939e75b5f6b7405457be8309c191d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 43bc03e3b1d82978e5c324a51cbfe2cbbdca7ad4fcb123ff942522ddb7a06972
MD5 9ba617043dfa6a4dde71dd95ff2af7ac
BLAKE2b-256 59edda2bc171b0b0cb8f110bbc8b6d51984302eb2a0e682ed4bd2c8171f8530b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d503eebc18bfb0147c903a1763878c9e95ac29236531f26c9c7cf275c87400af
MD5 44b1ac05a17c4235426b0bd3aabda13e
BLAKE2b-256 aaa74b26a9d705a1c4bfc3d1bd8bf16a628acc6f40c2434f98a2da127b2e8a41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e8b1356a763cd71c887a40fea1fd82610c9f5d4f92407ed99c4f7ea18f6a23f0
MD5 2d458d939d03129a89e953aaaf26bc1b
BLAKE2b-256 dcdaba317caf3d7f0a6a52adff4802b91f2d6b74bfb5dabe58ca39315a19d234

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