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

Uploaded Source

Built Distributions

threedigrid_builder-1.17.0.dev1-cp312-cp312-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.17.0.dev1-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.17.0.dev1-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.17.0.dev1-cp311-cp311-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.17.0.dev1-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.17.0.dev1-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.17.0.dev1-cp310-cp310-win_amd64.whl (626.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.17.0.dev1-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.17.0.dev1-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.17.0.dev1-cp39-cp39-win_amd64.whl (626.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.17.0.dev1-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.17.0.dev1-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.17.0.dev1-cp38-cp38-win_amd64.whl (623.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.17.0.dev1-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.17.0.dev1-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.17.0.dev1.tar.gz.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1.tar.gz
Algorithm Hash digest
SHA256 e74064965f64f261c0c1b4757857fe626cd728287a96f0032f80f3141aaa1f7c
MD5 8b05f9e280f671a0b6ac9214411698e8
BLAKE2b-256 f09396542a85b44958862276323819a5173d1d6644baaa7f413fa9a82f79a655

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 11d1f6463d9d56a01fa35b2fbb3b4fb9d9a5473bd2ac46158cb64d00bea774ee
MD5 8e5a3f76f51193c1dd42ecf0e1c6ecfc
BLAKE2b-256 fd7b5e3f69b1ec700615ecb7e3e52771e84dad715d4dc8e39ea91d6e9f5b6f82

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9817ff2caa4db6b9c3d405346d6e1230f3000553eb3ea462c977d8d0f083df80
MD5 3a534f0aaf9ead62b69543cf4b85eaa3
BLAKE2b-256 2c5322804467e9ecf7bad2ea6c24ea45e61e13c54a3f312f4cc0115ec3989c6b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bb4c7bebc85121c2ae453035f9c31b8932c49f7288ae958c59f2f654b88fe0be
MD5 ee4f03b1ef52823dc5a552d0f79ae249
BLAKE2b-256 ab48045faee79b20576d24e74f1f5acbdc527d98a547bbed763e1e7f696e1b6d

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 28a51dcb8ddbffeea223e01277b0fcb76a0b7091bc0a9badec98228e70f2d065
MD5 381e3dcbf71edbb3935912cc7fae86c1
BLAKE2b-256 cdf1d0b37e67f7921618fe2ede25f2d3ceda07b33949a28acda2fa6ea6e918a1

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9ccec0c06ab261207853caa9d05eb11a96ddc7ed9fe00703e295063de6e47f6
MD5 9dff8ef4d1e93dfb544607a4f9e2b3ec
BLAKE2b-256 0f4a2027dfc883d19a6ad4ca7b45a668fc977159ce5a85f49276181e2e2edccf

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1a9836955cf27dac6a43a4a6a3e479653d98c7b0345802f3fc6a7b225274ccd2
MD5 ae6a53d73a6d92b0b0e97006d390f374
BLAKE2b-256 2247bb2a0d748982b13b27dccc774200b9630c982bfc457c59566b8de4bae16c

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2c4b1963e8fb16e99e9b544cfced4c10c03e8ffef7978279c32b68297117b480
MD5 982a42b151e016c00065f5e33545770e
BLAKE2b-256 01efadadb86312d246792565157a0d77ae26742ccd5626fd4881ced260f81789

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7fa882d2e32c1e6f83a5ea8a843a68e21cf7572bcf6b51957b488613a5c03622
MD5 bce91c63744c37c5cdf386b63f38d183
BLAKE2b-256 3cf2effc5c6aa150eee428a6623deb7025f39463d0c286232fb49a54d5043ab2

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 01498c71e5f49ab63882b2da5c6f7daad88031a05de7a36f1f46d42d7c751d86
MD5 6d278e6fbaa857e9a204a383bdb123fa
BLAKE2b-256 061e765fa3f7822eb27a8b1beacfa119be8dae1b402aac258bf25136ddad4e08

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c13c224c06ff0213e27007a9d0b2eb6dd02d607adcf3125f260b713982e3baf8
MD5 eccd9bc8f8a2987e5d3a2364cf071ce2
BLAKE2b-256 6a4465fcddb65e8fd8461107eeebaca11f3cd4603481c82cd9b50feaf5c2c0d1

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a68957e9bc900f0170630130d4027776d69dd6ec1af20b4c86d5a55914b04bd
MD5 671dd2fa6619688584f9e779632c20d1
BLAKE2b-256 8c5b070c0aff278b0614c1e22f173d80a786d6c7711298dddb33c7f31372a7e9

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e418de19097f96163198be6503cec5b3ed038c96e67554632c623757bc794c69
MD5 9b66d95127ee9230c7368c9fe9cbad34
BLAKE2b-256 59e1731903d5c6a83fff2fb34abd92a36c093346a71915aa006a45ed4f68ce0d

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5e26f297d3cd816141df4daf364216362c5dc48212ecdc82db30212580775e54
MD5 c00446a02f60e8a30492d447520a1250
BLAKE2b-256 f7bdfc2d13ef0a7199c38756f0ca83cb9153b616867c62411d5a0a64383b3763

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 79a19c6dedfdbc32fc084f958bc284a52b99920f0568bdb29025665b35b51237
MD5 edb8aa6db9f75992c1fc3b5996313657
BLAKE2b-256 bc1fff9bd5e9fdd1bcfe10330569c96c9d00758c1e4dfec5bcac4e720bdc7c95

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.17.0.dev1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.17.0.dev1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a12dc54aff525b42ef9d71532b3b17f8dd3d31fc109aeaf346afc304fbea5167
MD5 555e907f3cc6cdf8e2a1a6a0f17fa201
BLAKE2b-256 79f2105ecae835a18745f6096169a73c6352fde6e5b8b46294c4d29cf7e71513

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