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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev1-cp311-cp311-win_amd64.whl (616.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev1-cp310-cp310-win_amd64.whl (617.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev1-cp39-cp39-win_amd64.whl (617.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev1-cp38-cp38-win_amd64.whl (615.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.13.2.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.13.2.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.13.2.dev1.tar.gz.

File metadata

File hashes

Hashes for threedigrid-builder-1.13.2.dev1.tar.gz
Algorithm Hash digest
SHA256 b76b143fda368a0feea011aadd9ea1a59a2d442115ebe76a55ee43cd6d838804
MD5 c38cf70f53df2b8879b1c8cc58dffc43
BLAKE2b-256 4b29fbeb4eb055cbf917904aa32b4a04ded5c62af8ee207d0b5fee40abc001e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d23317d12054736aa0e50c85c968618b98c16bfc211aafb00208554d05f121b1
MD5 fd6ccd1a44b778624ec739c5ee5c3e9d
BLAKE2b-256 8eb7fa5d7590481d1a36ce0346c76d3c4b62ba4ca786a3b9c2443ab880c82e18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b44b8ed196ebad33987fc33c2ab4ebb7093a516ae1cf1bae66b6b79e4d4ca77b
MD5 ee1e4c971423e71cbcc3826ad95ae647
BLAKE2b-256 c50a20347e761527796d634dfc034515857427ed289f2845e7993ac82df1716b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9833501d0cb691784b7b72ddfce46369d5ea5ac49a2a5c9a723fed09526a0384
MD5 654772f5b4733e0ef42f008e93623730
BLAKE2b-256 5be520299111baa62f6c36b98fa087ecb0e7817fce0d9b992dbc35331f717216

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 112e2656d0bbb90188d6c56859eaef25a3b08b07fa53e485d0c5a1bc4e05d09e
MD5 2d1a2f632936b6c180b5ae284698f357
BLAKE2b-256 c946e4892b77cbee48469aebab496c7769ca20f79f93c0aa09c55b7360aa4c7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2af85b7a8275f11c5740e27314b91ffe414f06183ed136880277ed86ce7d72b2
MD5 a8ff7902e7c1f6e9b833ebd32b0ffc9f
BLAKE2b-256 5cb90a157d16a00bf7df7c7cec50378e3d8f50bcac1cf496bd8d131f46ede43a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12e63367bad9e2e64cb033de1760a20c2fe39915902a8367c78ccd426b32c463
MD5 df412a5d81d7ea6c401b6aa8ef57aee7
BLAKE2b-256 3877a3ad0d9173ca2b015ea990e1d8a0ab80445c680de09bdc95970ba0fb2dd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6952ec8dcd0135bd166608d573049e5132b1ffed62309658d4fb71dc7a540bdc
MD5 b15ecb69bef2b9493467f631ffb66994
BLAKE2b-256 1590b40667f0931a3fb343d6651a28fcd9b8b84fcaf23a9fa5a3f7a8afd352f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13cffe46bc5b827548c410ea4ef98a1368ad09e35776515cc9e1560881c6fd06
MD5 1f7a79f3961552d76ab1a04b21c4de91
BLAKE2b-256 4d329affbc848fc2ea05b3a0787e47981109d5cdc41792072363b113c095d463

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 967942154e13f1ae48580d95eb82d8aa1e4f283afa91d0857d38be482ad0a494
MD5 b6a347804824f562301514205bb0407f
BLAKE2b-256 e5ed2431d4299231c87bd47bfb2517be28d2010388123d3edecf99edd8311ada

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3cbf88d3f0c0d9da2ab7513b72a77ff7ad81c76b9a0c800739e3f1cfe8d596f6
MD5 c1919262c343251ae7e79cefcb626b4e
BLAKE2b-256 f70e7ec8ab3fc29ae55497330b8ed82164348b126e4e0ecf49f77c103ba207e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6deef8b29678746a3d27400eb7329932e1b88584327ad5cc9441c3e99b032900
MD5 04a1a2a439ddc40d0b4763c795ace2b3
BLAKE2b-256 00ccc136dca80fe111518c76b63c6bc9b085814118e59196ef36a7fd4b24147a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0282a8bf16c15f3b42a36ff08ed032237bbb7b4a60994758cf0e8e138fda36c6
MD5 90385a34fa41fd89bb78c4b6d8e4f5d4
BLAKE2b-256 52a6d068426d39ca0defc2e1ee52a8270ac6f77f20cf7859a40d924d4cda6386

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2df8b0ff88ba7f18e367a382ba02d3ec4cf9822c3410e28b94f7dc6c82e77942
MD5 0c33e6c3b3aafa581d99f2ab077e5e91
BLAKE2b-256 5c51f2976a109f718ec8d7a7d42c5ae86b5ebd1b4ca38faaef0905409e3d49a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5575ed6b1de261a290b826b185ee24912b6d56a58a9d1ff3561c9066ff94197
MD5 19010e3d398d4de841f17f867b4fbe01
BLAKE2b-256 5da8e26b4462f4d08f2d1be7f299e7d45139726743fcfceb0b51fe8e259b8ef7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.13.2.dev1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 240b32c359e5d0b3675370527ce158da73c54f9e65010670f1e2234db57aeede
MD5 986b6593733b2dcf67099276381d4d13
BLAKE2b-256 6b03909845507c766721f1d1554ecee918d2bc4b702486be8f2a42a3ef3659c9

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