Generate a 3Di simulation grid from a model schematisation.
Project description
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
Built Distributions
Hashes for threedigrid-builder-1.13.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93f3310a81d2f9e23d088ffe6b6adfc16100dc1589eb2ff1fe956ecb524ffaf3 |
|
MD5 | 1d4db58d1c3d8d3c6708493ec84237c7 |
|
BLAKE2b-256 | e008ac7f9c81e4d47c5bcd84a354021d68b8c7409f2d33d43de08cd02627e371 |
Hashes for threedigrid_builder-1.13.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dbbada6f7c2e4003f98d1250768c19c340b05a4aaa447dc2895db88fc3b9f36 |
|
MD5 | 04d67ef2a41a4cab8ed210ea49001473 |
|
BLAKE2b-256 | 5d5058ad2eb38a751d9b4c188162f37d264f09d536f0e004e70cfbe2360a9f17 |
Hashes for threedigrid_builder-1.13.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274817e9cd3b199821b454abb617ebe3c001e1aca360e5e32e0e39186af4e34f |
|
MD5 | c97910d9db507adc368fe58348dfa06c |
|
BLAKE2b-256 | 8f31f23f6043c3e070ace22923417abf2c597cde4980405d66ea9112c382596c |
Hashes for threedigrid_builder-1.13.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f890092931cbecdad1d68ef937c5079698bd3a9522e46e7e1fc32ae55b534eaf |
|
MD5 | e400f72d8d07d58f63e5d451798bb9d5 |
|
BLAKE2b-256 | d831c7778b4b28df2380233dd6b6f4aecff76d921bbda0d1a6e1dcd31ea9b9ea |
Hashes for threedigrid_builder-1.13.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba2536a97c1f0612bb0378316d2e9ec242edc94d7f5f21d6a6376e277ca87663 |
|
MD5 | c45b973ab350404cc4647726284fac36 |
|
BLAKE2b-256 | c44790ac81f0ad96cbd3448ea31ba7897235821b14a7e86dc820d5adff11c8ec |
Hashes for threedigrid_builder-1.13.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6a246c3718522c6a9073b13f68a55cf51defd3cf75f4a323e3f6aeae1ab29af |
|
MD5 | 50dc9e75e755ec9564bf3a888e05982f |
|
BLAKE2b-256 | 7cc9db5c546430d12396258f21985f34aca8d61c266e92856d1fbf0d27ca1496 |
Hashes for threedigrid_builder-1.13.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1fdef1a3afe518c69b6c13e3553eb08105aa07c523b8a547fa8e0f066db14a |
|
MD5 | e2d5918dd7e3a0a22a77e4405103ebf9 |
|
BLAKE2b-256 | ecee6af91503020ce8a2bf255b042fe92c702ad1781996a723a4963cc0d3597e |
Hashes for threedigrid_builder-1.13.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae9aab24e80da9e6a779246efc220253285a7e6c73320000e0eb37630645a901 |
|
MD5 | cd8099e437061bd083fc448f9dfc5406 |
|
BLAKE2b-256 | 6db97e81632390e2836561b3315cdc83b3abe63ecf39fe7a7c6038a5fe1b88a4 |
Hashes for threedigrid_builder-1.13.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d61210473dd7cf70363c950a8b9da9b6781451dad535b84eda438049c2303f1 |
|
MD5 | 8f06dea983329c8bb890fdbac44cc318 |
|
BLAKE2b-256 | 5f289be49b4cd28d213977784193414d7c4d2acad59c4f63039d9fc2945c27a1 |
Hashes for threedigrid_builder-1.13.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | baf12481d7a79b5b2c4c84bd704aeaed5f4bf492ee048ac614cabd8c5fefec78 |
|
MD5 | 33f39d448bda0fc3fe12a5de4e1d4a1e |
|
BLAKE2b-256 | d5e5170bf52c7c41361dbc0eefa4283fa66fd441bea444c0627e4c9ced9f3117 |
Hashes for threedigrid_builder-1.13.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2f984710e381393a6ffaa3e2f951eb2a60d136e80546c91a088a3ce48f44cfb |
|
MD5 | 4507b1574772df1e51e6d2df36375415 |
|
BLAKE2b-256 | f41898428279691b2fa14e16944bd1cd25ba9a5eb377c5c705c5ec8ed35b9895 |
Hashes for threedigrid_builder-1.13.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26ef5d7b8ada34e50deeb89a462b8803cba91519a86c7f5796fa7fa74a3330d7 |
|
MD5 | 8b6aad45798afe8c9454b4d3cbb2e358 |
|
BLAKE2b-256 | c8b211eac908cb4ba5ca6418f1fce81c8037a82d2c067c1433bde6ae7773fe08 |
Hashes for threedigrid_builder-1.13.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09b19a6008adac5ab70935d3102c9cc3a405005d1078c7d3db4369a184d35481 |
|
MD5 | 005a09367468d8553c7f6e76b3f64fff |
|
BLAKE2b-256 | ae75f0f5368e37df0dfe8ce120c8f727f1c6b76a5fe9f23923e7ab44003836d5 |