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

Uploaded Source

Built Distributions

threedigrid_builder-1.10.0-cp311-cp311-win_amd64.whl (625.2 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.10.0-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.10.0-cp311-cp311-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

threedigrid_builder-1.10.0-cp310-cp310-win_amd64.whl (628.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.10.0-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.10.0-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

threedigrid_builder-1.10.0-cp39-cp39-win_amd64.whl (627.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.10.0-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.10.0-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

threedigrid_builder-1.10.0-cp38-cp38-win_amd64.whl (623.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.10.0-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.10.0-cp38-cp38-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.10.0-cp37-cp37m-win_amd64.whl (622.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.10.0-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.10.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for threedigrid-builder-1.10.0.tar.gz
Algorithm Hash digest
SHA256 d7e79e93d170798c62fdd94d6e667080452c776c9e96f56efef22e5dc026c913
MD5 d38df3dc7a29df04123225cb1a46f334
BLAKE2b-256 bc38a16d66356f5fa5c2ac9785ec5e0014d231496097263bf6c78084fd0a68c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4ff3234a9f917c284eb2ad8444374c3a820e2d20185a34338f2e0118c944f763
MD5 c38132d79c1a1fb98ada54383f05c577
BLAKE2b-256 c7c859db13a95f2b651cafc31a5ab79c7e4d4e369aade3e97d837242158a7553

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bb953a57aa41dce023c87e5df8ccf9ee9dd67d8ac9c6cbe6163075ae4f12f38f
MD5 4f0d07931752c6ea1518bccc403eae0a
BLAKE2b-256 3a0ed40b21a4940684e1a39f552cb591f407bd026c5c5d31518b54747f9f1e07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb33c2bc24196106d1dd51f19c6b90a7d513343a726786b3455e0355605c7789
MD5 b5e35ec414a00fb29b2e6943415c2291
BLAKE2b-256 78d46d5ceb1ec6d5526ef77acae9c52132af0f0158270e81aea91250c084e728

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e2aa230ca3afea809e84e6cca8cc62776744584f3c5996e72f793aae6f789b49
MD5 e88a8ec2a7ff9951ea7c83c4d015904b
BLAKE2b-256 0ce49f9f3f33a296266647b2efa4245662dfc9b251a26764a4ff274aa9b30d28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3f8be0d8e0e610b5bb498bc2200e18198b4f72f6f66d1fa1ec9c122e8ab47c2
MD5 0780f7a3887ca31155b4e779ddba0f3e
BLAKE2b-256 df06ff66da53f4aac4fa7b8c8c65363ad301c5c4a58a6c9ad0d0b5d22bb2ff4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cf4779cdf4d7f856ab6d06417fd2b118f4d7ca635fff7748bc9255f137e73484
MD5 003afea21a3a3a252a0bdb2152a6ebf0
BLAKE2b-256 af7b9f105f9a0e3b40a226cec1cd5422ed847459c1796f5ea400b62782780120

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1d20c0243d94f24a9f393c54b048c1e9a04a60ad31d94ca759d589453566334b
MD5 b8772cc6bff89565215194692bf09621
BLAKE2b-256 2bc6ef9609eeca8af94880fbc622745cf07a74e0c225f0103747a9a9055c944d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a59b3f9cc2a402ca7f9decbaf0fceab02a0e29e2d553ed4dc87f4102fa85cc23
MD5 3da205a31bc8ccfb87db1ab9d28858a3
BLAKE2b-256 b072914e3ec59950fb5c6a0eef33e52c403e65fe43dc76127f6e2985cd1d9760

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fc58fc2ee852d541606d7577e81ac960814f7cfb41dcdf7f90edd05e6a32c80a
MD5 1aa8385985245d697ca9ebc9c669e768
BLAKE2b-256 be9a0b42f983dfaaccf015d6cd1d7f039339bbfc52ad57b8c8c31788837291cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a988fab020fc457cef645a7da45853a3fe5c8d2117e199c09ad59ff4174b1331
MD5 18b2b1539c7628946036715a42bb696c
BLAKE2b-256 ad82bfebb064d76fa8677f24e68ef4dc71bafead55b4bd8cdcd10a20fb8e89c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fed8523130fedbabe2a6657621af0662bbf2998628ad803bac3bcecd7d07af7a
MD5 67c3a6ff2c79ea3e5b80d695f9738d37
BLAKE2b-256 b8a143b0c8d9e7c9f4dc0c4cf4bfdcea700aec8ac55fe24bf07c347c64912380

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a7612be3971348eb5107ddd8307715f1ebc5f680468eca9bc6a05fd1c4fbf3f4
MD5 359400f0823589bb0be4db2e071659f3
BLAKE2b-256 59c4f8feb53e6bebce234820cdd8b69c64de5e74e1033b54ee63b680178e1eb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 50d95ec45e7013f4f8a4f94fc050d230dbdce02fb062a8985330d5aae108dac7
MD5 cf98f80365f73ade95c42e0e385da25c
BLAKE2b-256 b438f14080bdaf193e601757819ab211b1e99681cf0fb5d9ff17b92ce5a08957

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8c47ccb66dffebf455ad8a6ff24c2598c1fc1a804dd54f8e4845dc31bc1be796
MD5 e279c7efd8255faa91e0f2811e359732
BLAKE2b-256 d02f8fadc01e29b8213d3535e8cf2ea74db8d282c86aecec1fafc5eec0715ffe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.10.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b2d0d6cbc54ea4b7811fc38d278cb0e365fda512c0a895e573b0da51335d4cd
MD5 206b500ceee34f68969ed4350cb0e0e1
BLAKE2b-256 d0380f32c5791bc6facf90ae710eed3a2f5c67b940d2f0a27c000d6b94bb4933

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