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

Uploaded Source

Built Distributions

threedigrid_builder-1.11.3-cp311-cp311-win_amd64.whl (625.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.3-cp310-cp310-win_amd64.whl (627.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.3-cp39-cp39-win_amd64.whl (627.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.11.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.11.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.11.3-cp38-cp38-win_amd64.whl (623.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.11.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.11.3-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.11.3-cp37-cp37m-win_amd64.whl (622.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.11.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.11.3-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file threedigrid-builder-1.11.3.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.11.3.tar.gz
  • Upload date:
  • Size: 150.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for threedigrid-builder-1.11.3.tar.gz
Algorithm Hash digest
SHA256 d7d3eb5e03395d11f58d2246a08309f2a442fd0bab1af6004f7c80a2f1f00006
MD5 6f6866265ddbd09b1d6bd3641f103339
BLAKE2b-256 48711086bc2ef9211a815ee1d73ca9f2d88bb78b32c119f4d280a54bc27bd197

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d154e49dcf786ade1dac619ea0e19e6ed70e50ac9874d0a9bb9f6617a39c66a6
MD5 97aedf2dce552be35ba43fde31e43dce
BLAKE2b-256 a2d8917f249bd01869b3d445bf6919cb939f3515f972f636ae83fb6d2cb2feb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f47e8d559b6703b5c8eeecefb96dcc360ad23aac2a313e458e28363c1bc20eef
MD5 863db2d14f8ec5afcbe53981314a498e
BLAKE2b-256 de3156424c68555d966f539018160a040fe186c321bde6ddad5d0e32b07ece31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 984b79b9a73e5127357bb070f3b72eee9034c582fc99e53fcce2faeec165b781
MD5 7c6fa054b9b0fcc9ff019231dbeea2cf
BLAKE2b-256 9f37b428f68b1231f65cee0b79a87e0a8e480ac312a2849a95f76ccb8f3d4bba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9fcc2909816552acd38fb0b7e86406ae5bcc1156d9588b899be4e500b144b478
MD5 f508204489af8ae88075645f33262256
BLAKE2b-256 928f66acd67babadc9b0ae5cef6bc24f77d54e7c7b10e040158d74efa69e8475

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 419d781381893be3dcb53c7bca5eb029061a41420d9514171f048303d02bdf5b
MD5 385d9f3887a673392c7b0ac58d346835
BLAKE2b-256 5145fc7e63677cb7837ff8da3fe16a0430eb5294daff3c8fb44437ccfa4f8468

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cd1fa189140e818c7dcff79ffe49aee4519aa581318a07c92744c78b47250c2e
MD5 44e1d20c620d74f6bf6f6349284592b6
BLAKE2b-256 772c735fe27098e48f95e96589fb48a1a94a206af936599a198f404953c76c99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cbda15b7ecca40e6c1df29c06b3e338d8a3ce6d483a314f5188182fe22a6d82d
MD5 0c94f862b20fa3534fd4732d4467377d
BLAKE2b-256 1acd77778e744225d908b8ffee3b30cb87ef073c3aa773f5c014df343441bd24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1a912481dd79cad8d9ecb0a8be301d493e1fcc8112163d114c5741ca076085a
MD5 de2075e1cf22bed02bbbbb91845afeb0
BLAKE2b-256 36febd12afef9885b472d81c0c519f5d783bf05a3734566d011f5e77ba2461a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 833e7e911ac267d2418463806b5fcb0827b12fbc4980186bc50d568c5c77f602
MD5 e5dd064f4d66502f14cdfa3e06448589
BLAKE2b-256 1bc9a01e63a9b988161f35199533c9585765b9a94507ff901dee43ee92b83de9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 eb0a0d711c2e819d0c14a032d015f430724e6edfe786da81e8206f5f32475ea4
MD5 7e32b709961b114fefdc25e304c131dd
BLAKE2b-256 9bff58e6f492d941cce866e014a3c13744372b96a1846e086c9ab68ed41dd9ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e34c7e30d34d11801ab2680ab27783ca01319af9ae78913ff01cea92859ec89
MD5 060501963ef285e7990845251e57bf00
BLAKE2b-256 74eab9b037d37e8c08a0ed6cfe5f02b870c554632119ba74ec6623a657e762d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7cce154c6cf12eac61bd536b3c8e0c7b9d66dd51597a84b310b4287832bd0629
MD5 4c39ed3ac00cb65a11b8c221560d8423
BLAKE2b-256 5caff97efba982458152270c8cf16b697cf0267173c7f07be6a1d3fe5ceff646

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.3-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 35b2cb5163001d192c76bb71150d7b219e8cc17d8323908ce9cf3e41a18d0706
MD5 2afd0a6bf8528fba521f6c393bb59a66
BLAKE2b-256 8d4f3f81c7b9dc3583865baf996e3cf42224d4803a6dae6d13b70b460b0d4bfc

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d01db61ab2f5dcadf3e908640fa521d98462e316b4a7c2acfa1a2a927e22745
MD5 9d69b503437432ff5f7bc72c6a2988ee
BLAKE2b-256 b12ac095c9a0d74c0661ddd872d6c12b24c83cc671e7fbd870ed933886714f22

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.11.3-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.11.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a0e9aae7db75bdd699d50ea4a4d67fe32605820584c71cfbbaf0a7230d525ca3
MD5 2e8a0cd1bfd5cfc2714402d381b40d11
BLAKE2b-256 1d382752df5fbf11b88e2190aa7a8b160d068ed171383d32a5eb7a6b8f9292d1

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