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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.16.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.16.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.16.0-cp311-cp311-win_amd64.whl (624.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.16.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.16.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.16.0-cp310-cp310-win_amd64.whl (626.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.16.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.16.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.16.0-cp39-cp39-win_amd64.whl (626.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.16.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.16.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.16.0-cp38-cp38-win_amd64.whl (623.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.16.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.16.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.16.0.tar.gz.

File metadata

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

File hashes

Hashes for threedigrid_builder-1.16.0.tar.gz
Algorithm Hash digest
SHA256 946a6666767ab6c9e32f568780d859207e1839310f6b51925b5da7045a4debdf
MD5 21b9a854681ffa57eb082091f705e8bd
BLAKE2b-256 49c284ebfe52c6472022d248ffa1aa0fe4eb9452ae09904957e67a0ecbb3b3c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b7e42cd5ec64a074f2c6815342c50a0f552d6381e5c03b464cf7dee87cea05b
MD5 6063637454cb897c826dc3ce625a6c1a
BLAKE2b-256 60b42016deedcf2e2a4a7392de489ce0b3b146b67c404b1b18f0876bcb585ed1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8912b48894eb7a8d7519d432296dbd20e693db1fefed51a6f0e13e8d5c2312ab
MD5 3d15cffbad401f104993a6b525ce51cf
BLAKE2b-256 8d12f20f025f681d95ef7bcf06e12e484f8d3133a8158e9db4bd90c0bc260e65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 489f0c5b448c2f712fd09b751d774db729c268868890e9202ebccd21a8c84e4c
MD5 8735e06c33c50866fd68878955a395e1
BLAKE2b-256 0ea503875b4b0c1ce85b1b9b5d79efb6118cf07d19328f0de3607f372cd5a8fa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0a89d047f71b99c2cbdf387154e7dd485905ce79870e010749060aa845d56711
MD5 ab77807fd9658579004ae31c167abfa7
BLAKE2b-256 83dd5b7c272fb5914bcb2be1fe87c8eaf3fc9da9801ea2a26791fa1a1db947e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9291e1798e56c1bea5bed48675c8f9cbece6ef96655c6f53e04a0a82b28d9183
MD5 75fb1733350dd6e9f6d9baad81079440
BLAKE2b-256 57380f85a8d37e013b4865f4773e68d55b61de4aabb323685fa68c567cf9899e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea9483ba408568d12a92e83cc6434b0994077cace8f311fe66027f31e0dbe3a3
MD5 d8aa5bd47413749a27f647598375a5b4
BLAKE2b-256 19671ec90c07a5fd1cb6cac1b4522b2bcb3cda9cab2069b5ca468222938788a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 02609d5563e230542b96f75806d28300f5b0a6e66eee44465156168550995739
MD5 e580b5fe6e4ba8b7fba6afc2ecf659e9
BLAKE2b-256 a625fbc23ba163d677e3bf875f325c5116a75aad39b70dd2653608ed5fd94063

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5579939ec3d38da6bd5e55c6c208e5f8c4ea67d3ff1d7c229eaf00c85f72c38c
MD5 5702df4183c9127170515c5c6af1d827
BLAKE2b-256 8f1c946d341cd6bb9fa7cbaef0dbf5128a4078c071667cf970bcade9a73f31bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3d7c0e817f0d87daaa8b18fde7b324408e4fd9f9770259c81bfd324a1e2471b8
MD5 812147079818babf721fdd3ecf0fb899
BLAKE2b-256 9c32c275e0e8b1f5b071f6729175e23c607b15f23d3ca4a87bc31760b1212ba3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 074a73f40a9885d830dbfc48087b777abffc994b4b25e84aabb9e14fb4a7780c
MD5 11677a2753596491a2b7b8294cf7827b
BLAKE2b-256 ccbe959e6a50591d83622fd2119ba758f017d469721f13e71cba5f560be132ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67c08ca9ca162c8f57d030311ade553e3c50b334212ca8a86e1c9d23b85a0bf4
MD5 c346d7364d700cf067ee002f40654190
BLAKE2b-256 ab628804bd92c0f17c4bb265e9cc95a30ac12a27f1c1209e6a6e9fe253475553

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ced1658ba33bb2910892768da4367d3533250d31c1a8c9d04eac146b267e6082
MD5 b40c7b103f7dc464ebeb109795e9109a
BLAKE2b-256 4377d1c02da6f5463ff51376310655a2d3fe70edc8ed7f1b276892e31ef46348

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 06dd9519679936a3e5f594c1d6636a57f7736964b4ecd6b6fcf92eeb4ddf23e3
MD5 043f5c9c08a2e1c3f0e5290ce5c55bc7
BLAKE2b-256 3443aa15fac99fa0eb70813b248758db988f428943c7f22975127726ae32871b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1e37aa9712372488ec4a78e1cdf213552fe53ba7f544adabbd816ce718261e08
MD5 19073d66acd6a0c453d3cd33b3fe5e58
BLAKE2b-256 25169a7c9c58952b225e608e6620bb98f6cb385cfbdda88fdc750949688cbf05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7163b771b6ee2130d9b662fea3cec561fbfb6f0cebb80451fe47db0d96391c7c
MD5 742d79d0d5c94b8020a9feacc57928a9
BLAKE2b-256 bc2c771e7b7a13d82a82f3d0a231d2851987eac2b8cd112f7433d1e95e478bec

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