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]
Release files for threedigrid-builder 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| threedigrid-builder-1.9.0.tar.gz | 149.7 kB | Details |
Built distributions (wheels)
Total release size: 16.9 MB
Release files / threedigrid-builder-1.9.0.tar.gz
| Download URL | threedigrid-builder-1.9.0.tar.gz |
|---|---|
| Size | 149.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c56ea6ebb0858e706c42868d368302825c124bdf70bb4199710b56d86771b166
|
|
BLAKE2b-256 checksum How to use checksums |
6bded4fa81887befd3d08d5cf0d124803d3d142dbde109c6825cae8b8eb896e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp311-cp311-win_amd64.whl
| Download URL | threedigrid_builder-1.9.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 624.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
eed0c5960ba464e0652448eada6d701a6d3e0d199926bd00a07a1c156dcdfccc
|
|
BLAKE2b-256 checksum How to use checksums |
4cccbcd617de26ec9426fb1d99ff347788799e3b95adeb6d94b60e05cd8aa393
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f91f02b486dae761bd97f3217198bef6b2a21f70500151c5ddb0460d6722bbef
|
|
BLAKE2b-256 checksum How to use checksums |
2f0b1cea1b44ce2c4144e1310315fa91bc10f6749d5615a946cdc005edc2b7e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
33bd4d306a698fb5349f00898ec790c2d94c489d31ebcf92f9072a7f089eaaaf
|
|
BLAKE2b-256 checksum How to use checksums |
884e24da173a74aafa5fd8d35fbb6ceb53c5f21d471adbc33df0bda30d94958a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp310-cp310-win_amd64.whl
| Download URL | threedigrid_builder-1.9.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 627.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
13ac02b1f2f75ebc67b1bce8964614d25b26198769c406b533ce0d229de803ad
|
|
BLAKE2b-256 checksum How to use checksums |
1d4e71ea2b437e5d34d43274c7285abcfda545f4206388b0d531f4e03b72271a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
cc1ba5a4a8a374146869245e9dd041aa50406c64e08fdb8e60947c9d254c9e66
|
|
BLAKE2b-256 checksum How to use checksums |
157d1527ff59043f585a2dc90d7678edd49b478834627d0f49868746c0b443ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
0e0ff70c46accae8c3ec24a76206920ba9d40c54f3407c60b6c829799dc5a746
|
|
BLAKE2b-256 checksum How to use checksums |
102363aa24e32905a28001492261354cc967ffa6bbdbba2306a237136a0700c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp39-cp39-win_amd64.whl
| Download URL | threedigrid_builder-1.9.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 627.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
084d72a67262c2415ad540499db1ae3cb73089e3059c994d737779f9c17dae10
|
|
BLAKE2b-256 checksum How to use checksums |
537426f3b3a72df4e1803cacc17fb192df95f9faea5195c0059d877195cb46af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c360353baa9b59ce0e9c0ba83b4dcfd96758d876925bcb708ae006370595c7a5
|
|
BLAKE2b-256 checksum How to use checksums |
7e4d697cbfb202f91efca82051fd61d73db5aced52d83d8312c73cd0a3e2e2ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.9 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
ea93ccb23c6cdf3452dd41d1ac44aace675675d6fe7fae91d9c8a98f3f0ed5a3
|
|
BLAKE2b-256 checksum How to use checksums |
54c847e81ddb461fb6f12ddc7c8d73efe660920a254a504a43504876a987a6d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp38-cp38-win_amd64.whl
| Download URL | threedigrid_builder-1.9.0-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 622.8 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1977cc544519b9c6a39cba94d3ee72047434f01e9110d77664f1ac621ed9f64f
|
|
BLAKE2b-256 checksum How to use checksums |
c1a14e6ade4163d7dad08a1ca6c0d95243074728181eda03176b1bc671cde1b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a30098f8d2a2ad2b589976146429ac59acec77fa8f32dbe4a40b082658245f6
|
|
BLAKE2b-256 checksum How to use checksums |
4d9d30322d01a75986502f073c320532be4f9b7e3812b35a4596cb1a3feefae9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
52b4ba00268c2f9ab850f60dd058ac7f8f25bdd3c2743594970fe210b4bf3932
|
|
BLAKE2b-256 checksum How to use checksums |
e29cc311e0085f3635a95af23ad129ea36a550aec0dadf8bfd70258b237a92b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp37-cp37m-win_amd64.whl
| Download URL | threedigrid_builder-1.9.0-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 622.5 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b601763d42342de8ee25cf1f4c16f4866a80d22d6d4c52acb41e8cdc5652ff93
|
|
BLAKE2b-256 checksum How to use checksums |
675e38ff6aecaee762275a379e7b00264180c4134cabd3e494c9b684c0fda19c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
3e128404c3233940f0a50921593067f6634a6cf9368aec1274e65b19bdb82b05
|
|
BLAKE2b-256 checksum How to use checksums |
bfcece82602024010e9b84a6057ec2294f29d3d2deea881b96034b4f16e5bdd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|
Release files / threedigrid_builder-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | threedigrid_builder-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
38582d15c8a68c933dfbf07bb08f8d78cefe13006d03a4869036fbe5971fa711
|
|
BLAKE2b-256 checksum How to use checksums |
a56e6faff53142e7fca5aa3e35cc5f9cf7bc2d61522a8f8e2cfb850996dfa594
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.2
|