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

Uploaded Source

Built Distributions

threedigrid_builder-1.14.3-cp312-cp312-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.14.3-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.3-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.3-cp311-cp311-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.14.3-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.3-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.3-cp310-cp310-win_amd64.whl (619.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.14.3-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.3-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.3-cp39-cp39-win_amd64.whl (619.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.14.3-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.3-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.3-cp38-cp38-win_amd64.whl (616.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.14.3-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.3-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.3.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.14.3.tar.gz
  • Upload date:
  • Size: 151.5 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.14.3.tar.gz
Algorithm Hash digest
SHA256 dd3b28aecba80b80abc4fe7f05282cd376df8ebdf45c2b854a9bba8d2a6f1d91
MD5 55e0f48c95ce2043aaa93f68478cd12a
BLAKE2b-256 5107710ca332e4f794315e719ccb6d57d1058a9d65c832fa398a84be5f1d68c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 57a8b966bd1fd3ee5309b5ea980b1a8af7e86f6bd125accdebd8aef87e8f8bc2
MD5 ccad3ba69f2ab236b12288cc39221ca6
BLAKE2b-256 e2f3ff5ff1b28d63faf99b7a03c7e4f5669bde7ce2be403c0fcb0a996282ce27

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e3b2c6d4a209fd66c63b0dfee6cb3726f8665ff094ad93e903b2be6523a4261
MD5 cc3be17fa792bdbcc0dddcea7bfec46f
BLAKE2b-256 d5ae2343612c99e7412d7981457037d9a2e2ee325b602b2bd2e3fc096a900868

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 67110b204eb44ce7be535ee4cf56ee1b2e334c896f01a0d1515b8ec46822b6fb
MD5 7d7386bef9b01ebe35457bb1eceb5c2f
BLAKE2b-256 01353fad0400f0609fa051222e751fc76a398b03ca5e36881ca72d2870e2ccb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 67a48ca8d532de0557aae54487df426c0fcb464a3e38f008e41704aeb846e1b4
MD5 b0e0983e8faf31f493cf4952c3f8649a
BLAKE2b-256 fd4ca7ed4405de6121051cfccdb1a0bf44f16f4516735e6e79bc4963b6ac2897

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c535dcb46647ecb7ad35ebbe7bf297eb794453699c8b1ad236c8d6605d5fdebf
MD5 d164bf6cb4b824f4288eba53f83b32e3
BLAKE2b-256 58bc30c5641222c23f02c748df47672072fe25d70a9482e3281eda9a84837411

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0e61748c401136f60d69ac971bc50771d3c4f262f666a772cc6f1258b76178bd
MD5 1781f4649f58e50324b1933dc8425692
BLAKE2b-256 70c0435b997ffa4808d9371ab581b17b98c4012e04c3445bfa93360ac51b7a67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4af89f2db27ce5441b6f94d0d812b3375b6ac0a54a6168ccb7cc9bb9106d6783
MD5 f5f66cbc491c1274b0160ebca7af4441
BLAKE2b-256 84bf66f517183c7176d0837465ad10e55ae548614615ca165ab446ed3b1392d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 661a215b6d433b845dea7235a476a564a6414bf8877157b4d8197d5649be4e07
MD5 4e3268c5789e2670141bc9d54ce638f7
BLAKE2b-256 1ffa36da72f365f07f1ea359cd01c2b6b0cdb35ab797f4bcc95cd0f7a68fa752

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b3b84b5a6993fecfedda3fe916036b0262dadc80845c3859e49187ac7a12108b
MD5 479a2b34b8aabbeac2609195cfcf1848
BLAKE2b-256 6ce2aeb64e532b6fed43ea438384049df1211e730a23a6ef6ed17a9de0bb01ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 16f8e10a2bdac5d47440270a77228027cc37bd1f4ae9c600643c2792f0c8d379
MD5 d82e7f39fe1189a8c93fb4b5c9b02d98
BLAKE2b-256 a53fc263af4bcca366ed00f86402df3c51ffde8ea21ff53cbdb674972700c585

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b6057b126211f10996129f25c0eb4560114b0f20060b043be7e47cb2c9d19345
MD5 00374e8c3ce120412ca2daf784b58bea
BLAKE2b-256 d75908525cb9716530586d2ea411c6a4b95a50221c5f0b0b9262ab688fc69a89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fbb85113ac7767aed0fe22451deafd06b6b74623784d27dc6d0c0f5e2bda1272
MD5 0e2a81b5aface4350e162ac1217a7c36
BLAKE2b-256 258fbae21d6fc0cb4a585f222269af84db81eedc1b5fab628b173de64c8646b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 64e9e80efbdaec37a0fde8b35bdc95de204c9d32995cba8587db9750f3f9cc52
MD5 29c88d7cf810a3fa35abba685533e6bb
BLAKE2b-256 26052a21713f20a6b2b8fa4f60edfbf195634ea7dfe7aa1015f762c7bb78db57

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e8674e1bcc4c27482079a53bf3571ae7f66d8bd6a8b10f1c7c9bf8f29ef38084
MD5 0d98656681f68b0397d2c107f31b4fe1
BLAKE2b-256 568bb37845c65079131f8f6b66f3b4019471c1a83a8af610fe97efcc13f127df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3e57f97fdcfd21b8d6812b5acb5a30f9ce5f17f3d799e59b9a6f6e915bdda842
MD5 7c3b3fb23870d0a2a095cfc444c262f3
BLAKE2b-256 84919c83de678503928d3989862f018b03a69b274c4ef455cd8986116bc4ff3d

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