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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

threedigrid_builder-1.13.2.dev0-cp312-cp312-win_amd64.whl (616.6 kB view details)

Uploaded CPython 3.12Windows x86-64

threedigrid_builder-1.13.2.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.13.2.dev0-cp312-cp312-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

threedigrid_builder-1.13.2.dev0-cp311-cp311-win_amd64.whl (616.5 kB view details)

Uploaded CPython 3.11Windows x86-64

threedigrid_builder-1.13.2.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.13.2.dev0-cp311-cp311-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

threedigrid_builder-1.13.2.dev0-cp310-cp310-win_amd64.whl (617.6 kB view details)

Uploaded CPython 3.10Windows x86-64

threedigrid_builder-1.13.2.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.13.2.dev0-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

threedigrid_builder-1.13.2.dev0-cp39-cp39-win_amd64.whl (617.9 kB view details)

Uploaded CPython 3.9Windows x86-64

threedigrid_builder-1.13.2.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.13.2.dev0-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

threedigrid_builder-1.13.2.dev0-cp38-cp38-win_amd64.whl (615.1 kB view details)

Uploaded CPython 3.8Windows x86-64

threedigrid_builder-1.13.2.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.13.2.dev0-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

Details for the file threedigrid-builder-1.13.2.dev0.tar.gz.

File metadata

File hashes

Hashes for threedigrid-builder-1.13.2.dev0.tar.gz
Algorithm Hash digest
SHA256 b8decac9615988ca385f3b0bafb3b34e170049f0cd0b7fe2ed4544b56dd11eda
MD5 5c644cd03916fdb87ea5cc07e6ce7834
BLAKE2b-256 22b842ed608e781ec0ba5787a4a5a722546338a5e1c8f8b9e06489923b6fa189

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d1891c801bda4b1970f54d6924a6c22d456c0c8cea5bb0917493ee7cc73d3b4c
MD5 baf274b1b44a5c90f510b5eede7f6e9a
BLAKE2b-256 5bf491e11c23cf23b547d8d47fd2f19984855a628cc8e1859443b0d0316b6480

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bafebe078a4ba28c718967f422b48ee88a996ee0fbd9d75d80bb3433dfa08a32
MD5 c412e7727c097a5db23e9ba4eab3b9fa
BLAKE2b-256 3f98d2b374916c31e95d511169f42b83cd0f230ceb99e7dd90e971aa52d31c54

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c2834a910fb8c253016bc583cd2ec47fba26a4547b0effa212b833c29270035d
MD5 0ac7ed192dca630950841889dfafb339
BLAKE2b-256 d8f11a031f1427b2fd6e1394c861ef34268f603b3c927c5345214454dbf52482

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9f9e937cbb15602566dc8dc7960c0b2cb1e02522aea3a012b88c506c2a9a083a
MD5 741b7620f486d934893f6517218cee9f
BLAKE2b-256 15d9737f37bfd4caad4c775be1668066de10f5eb3dec6eb7bbca01655fc43884

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a49fffe60c3e0ebb6ee7d383f7078821e942be9acba1c12f7b50c49fcf1d662
MD5 0e0516fbd33e9cc1048a4e519d821d2a
BLAKE2b-256 18670bde583406ffa890367375a01119c5a210c99f495ddd58004d9a8ee06749

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c3550add83bd080830c75a82f5b7e30b2a1f1a2dd1672816365bc80b1c318920
MD5 07df4878567969bfd94445fb43e4f44d
BLAKE2b-256 ecd68063070a8ede987f22389207a397abb1e9a2f132fb18e5713901ebf2fea5

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6443d2b526fd46f3cae04215eea656dfd043525f53fb2368cd9143df24f80c94
MD5 bf0fca283e2e50fe5f76700b1d704392
BLAKE2b-256 516d10a11667b2415672459b4712d8b5dbd39e0cfef501ff8d8d405ff6042e6b

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d812015f00b7ac8e5ff881b479f2c8bcc972b80af07d20af7e32a7bde7da78f2
MD5 682297225d789055694b2850429970a4
BLAKE2b-256 020fb07d5db97eac728f5975c3f561dfaeb39b7ab6936ab77c5cadbc857ed43a

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ed4ba587f0929c834c882e0a2d0c590a05469c9a58219746a460bd6373bef8c0
MD5 9b24135145df9d9820a76ec3c7e01ab2
BLAKE2b-256 cea4d23a244db49c0893deb7cc3d7b1763b20ab8c1f5e20b148e93106e9fae44

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9d4a189462496e12ede481b990ab1a3450476d14f6a6d0aa4e77cdad8fdcb2d7
MD5 2b94a833664f85ae4b5265d771e5f379
BLAKE2b-256 6b59fa32b0d7b373bc4467ce0d82be82f18fedcc38729b7c1596901e1db5bdcb

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 724f002a7a3c9d3617feab31d48f03cb911aead55c6385169047ba594308772d
MD5 515af11ba812356b25595a2c375cb970
BLAKE2b-256 d82ed0a7e9bae11ea36781956a781261e6be25bdf21e711007c9e54c2b568f41

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c623b318ae58b65f051467f812941857fb3c6ad5b0374ff96959620f63b3d901
MD5 f2ed019605ca1f48dedef682fdfef805
BLAKE2b-256 20048a56d0b8dd3c0abb4f8c58b57c360c3b3127c22ba8268e62d77c0612edc1

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8c04dbc7df634c0365cefa9ac2bef874d7c9cdc5667e7940e480b362d7cd818f
MD5 04ed2363fc04e0621716c35da63fdbd3
BLAKE2b-256 3309f01da0898a9ad3025fae84a41a65f5c832031b6a5525b0a8d8fa5356dad1

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3b2941ae699e280641727216854d4efb3dc94badb892614997d1ca05aa5b2c7
MD5 de168b3f7c280830870c5b9f48a55082
BLAKE2b-256 2ce21a37d9a69dcfaca85f060bdf5f0023955378d11b4f18aa16d89c08d06542

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.13.2.dev0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7be1e7fc1b25b816e5e6addbd4df8ea621888d4547e906e6ef48bd90011006ab
MD5 543f252ab0c49a511488b1e0f8d9487b
BLAKE2b-256 dea76c36f9733a8537dfd3411b0c1a513499f5d4d09130cc1c70793bdc6be5a5

See more details on using hashes here.

Supported by

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