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

This version

1.6.1

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

Uploaded Source

Built Distributions

threedigrid_builder-1.6.1-cp310-cp310-win_amd64.whl (632.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.6.1-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.6.1-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.6.1-cp39-cp39-win_amd64.whl (631.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.6.1-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.6.1-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.6.1-cp38-cp38-win_amd64.whl (627.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.6.1-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.6.1-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.6.1-cp37-cp37m-win_amd64.whl (626.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.6.1-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.6.1-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.6.1.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.6.1.tar.gz
  • Upload date:
  • Size: 143.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for threedigrid-builder-1.6.1.tar.gz
Algorithm Hash digest
SHA256 a2ab1f451687af008862b4dd93100084140badf571da4b0e453861960b3065fc
MD5 c35a4a4701051b9047337593547f1442
BLAKE2b-256 b8f6f2e820cb1e5d0d97d1f75fbe844ffcac40459e4aac2010670cb9fde04629

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c717f6838e66c490e22caf85d4eb476e5e83314c715c8feedf3a7490ca37e38b
MD5 7c4f6ae46361e3538176da56d351c044
BLAKE2b-256 89499f9d7850fc10e5f9127ed23ba27ed39ce939659dbad59b8c4ea36ddda213

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d90d4b33da00655419ec2872278a6ab992fc8bdaa2ca98427612305f34a00ab
MD5 f34984d6a9323c145079a6e1b91d8ae0
BLAKE2b-256 3ccc94af9b78b065eb910ad36faf3840b1158b768b181c93c1d3a135981e1c4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0ebc805df978ebb693a97415fd5911d06bdf488f8f19f434e7e568bcd15b2cd0
MD5 27c6a33f8b6e9e5bee85316d0308b5de
BLAKE2b-256 a760c88adf8afcbc141b71d73175336f2300e230032e7d7b09d01129801761c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6ebe635ee5aa56431d0fd7c39cbb8d66eec16ac0d348da1b08b812dcdfdfc6fb
MD5 407fdec27540108b18b9b3145c7f9ca8
BLAKE2b-256 371140a16520c8c184b8ae2b07f90ff788fe06a2299137cb107b8e11404654e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c5acfac50730fcad409ab6d3555b32e8956b3022ec39ff0229390e2916ce1dc0
MD5 ab355b9fbfc4f587788e07dc061d19c1
BLAKE2b-256 d1174a162b25e6620f3a758cdbc4c110d2b00698857978705c67ebec20a6cfc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5371d936634c9e51a16afca8dab9376242ae66ccbe876e240e7bc766ba14cb0
MD5 743313bf135ab2074bcc5d8cdd5c2c7f
BLAKE2b-256 45eb0c81ec88e73c6b8de661c06e9824d2ffde90da806f171944e573228a11ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 cafaa097306bdcf579b681209e59c6eabc1bade15f76665d2a53ebc642b4c757
MD5 893ff1b2dc49deb24a10a36bef3014e5
BLAKE2b-256 6186f4d600a2e2e4658762d429366b356c6be763d53571f1a257373cbef50b56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ac97a35f6e76ecb70fd95f4fc7820762d800bcda225edf16b2b905e53ca3494
MD5 73692a462aaba3cbfb43c993e3dec77c
BLAKE2b-256 0bd48f93e0a90ee5c053c514692413028efd7268d0151c44c7e666fd25488004

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6f092cb414192d7043f47ec7e41ea938651953ccda11d25b30dba3e5ed3dae77
MD5 519ec8cdf526e2ca168652650cbd85cf
BLAKE2b-256 91743dab4f13b994ccea832c4c102f2a373b6ea6a19c5b7eadb65a863cc8f36f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 7e9e9cfab999cd934d8f2ae2aec3629c698e8f1b65573f95547859890547412d
MD5 29cc74dd4d75a2a875c703724e45448f
BLAKE2b-256 c26d3aeb655bb11896c68022430e376ce12589efc0ef4566018e86760f32e9c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea7bd11cff11487bb7b1fbd291dc9257ea4a09fc07928ce4c5a72ea6a0474b97
MD5 d359e1f28dc767ef6d00fc845cfebd4b
BLAKE2b-256 936fcaa194277007b0894aee8c185f803f0cb17962191be10b3c1389e56d57dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.6.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 423fc08129f51ae9cc1cb5642e392779804519518fdf90429d1abcbe82bcf25c
MD5 790f7adf613a452d7ac1f7811dfe0d68
BLAKE2b-256 560e7ff4c03e4c7b8823bd2d92bfa6036b2a759081ee3e37588800c733ab2c5b

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