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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.14.1-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.1-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.1-cp311-cp311-win_amd64.whl (618.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.14.1-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.1-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.1-cp310-cp310-win_amd64.whl (619.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.14.1-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.1-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.1-cp39-cp39-win_amd64.whl (619.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.14.1-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.1-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.1-cp38-cp38-win_amd64.whl (616.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.14.1-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.1-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.1.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.14.1.tar.gz
  • Upload date:
  • Size: 151.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for threedigrid_builder-1.14.1.tar.gz
Algorithm Hash digest
SHA256 91ba3c1352a9ed687c2bfb3e5a5604e879ddb8a0afd91b1c3eb90aef2f0d5c26
MD5 5a0f50e7831e65b097f1ea3328ca438e
BLAKE2b-256 32d92de83ff60ad9ca8ca0ca12779ef5730894a09746719d8c74cb6520428498

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ae89d3f6b450d88f17e690fbd172e7ec452d0688e0f4bf550c5f04abc39ce369
MD5 88196b9772deeb04a992f6baf9cc6b1a
BLAKE2b-256 43b341b699f1b464983bb504c76d2c79d19bd11adfeacc8a269cbd8948d673f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 772c957eab0cab25394a217c559e41af6142108ab3e837948a2555a73696cbbb
MD5 0a519fc55de380297a391036df6d55ef
BLAKE2b-256 38125e5eaf2813d441a18c4fdac889024248ef8eeb612aa9bf67463f194fa1da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3ef38a69e956b85486b194d50e5297193ce273c7f604cf5841743e376cbbe196
MD5 bef74be664d79eb2eb0cdc4ccc8280e2
BLAKE2b-256 2ec2f9020c4c5521b2a117db660deea32e4f4c296608632641ff19787d89f762

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b1ddc304d781f2b563e3105e0f2d87f6b8aba6fe07a2f3a2ae2d244adbc2866a
MD5 a6c2376990573d6304ee38639ea34d8b
BLAKE2b-256 73f2769f116a79e969357b8bc31d52553852331af0f77875303fe4d307103e0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55ae0c775ff1b05b35320b521d53eafba6336d21ef8891e034dbc4e21338bb3a
MD5 e1427fbbbed0b8907344312d4bb2b69f
BLAKE2b-256 d44e67233c9608d6b601c5635867352943db8917746325e12996fe3b75ccff6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dc8c6a1a1b39908efc852cafdd646cfab185bb4180e849f31001de53f6d11022
MD5 e0c5558a2af1f643810b126178b0858e
BLAKE2b-256 56c0ac00d9685a04b72d85e6d90f5f4e77b75efca4dc0a877f8684a42c6e4140

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f343a75f954a24afe45acdc604de666726b03c62ce2c883e03702b00c3d819ff
MD5 928dff065e60e4845e3e3faa4e940d4f
BLAKE2b-256 0a91133a09278e0db4776ca886f325858127fb2044223d07bf4194e185ee6f6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9cefb54682d9546eac21df4e0474cdaaecac57f64cc961f705ea2b07e5478fcc
MD5 e0b84c50589c10fcd4ccd9df34d32672
BLAKE2b-256 435bbf8e0172e99b3684a1df2780ca2a5c90b8f3bc1db1eaad5f9ffce0550469

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b8af9364853f87560e67d580aa4263120a45a133da1d588c2a9cf924d52bc12
MD5 5f5fe768276de2cc044844626e643d8b
BLAKE2b-256 6343416b2960c8f690e994b9e72fee4d4a7ae6697dbfa58d60c27a2c92482185

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5ec976cdae7e0b09a7cfe747332ea5974269132f500f3943d3c41a66878b4ee3
MD5 f2f8ba9cc7c627a83736e9d933176402
BLAKE2b-256 4bb7e76d68b2b9b5b2ff5c31faff15783b3a48acb8fdfb9eb9f02de4be47c93b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 efe7f00ec10ef55bf589875f0d708749808f190bab418ca06e9805a0ce6a4e04
MD5 2708fcac410229b2ae7b1796e47f562a
BLAKE2b-256 39d1b1a6a4d9113dc9a1c8e2803c5eb7846398c5ff816a4a354b83d8226b0dc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9d99ecd3eaa74f36fb76bfd1a51976f2088f984e92791e2a39fc66404a53bbac
MD5 6f09f7ce446a072bd53baf136db1f716
BLAKE2b-256 b5bd2fa33ff5f9d63c32c601eefb97de755c62e33e3a401711165ec1f1cda897

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b20669ba5a012c91139f423ab1c3d8bf2e8f933a45ab630d91277281f71d7c41
MD5 d54f90fe87be6a516f208ca6eae419ec
BLAKE2b-256 503be0a6d3d1fa09d153110dcd622832e5c97bfd1eeaefd3c200f619ca065059

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8fe8a39f438f4bd51195dbabdab66ed05e1d38768f5bb96995352c668fdebc2e
MD5 0c249c9828766a6fd8ad512f48c6fe26
BLAKE2b-256 09e1ca7202a66f682e0500a547894a0cb11acc9f3889c58f23809f630bd090af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cbb2f0b2cdc73d9257209a362dd9441510780632c5bf422ee0466ad3baee5c56
MD5 6c98b0c26da74c64de41489588624c0f
BLAKE2b-256 67dd725f6659e6cc54d7a4dba9fdf5dc95fea27bc51481cbb1abd2717811fe2e

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