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.9.0

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

Uploaded Source

Built Distributions

threedigrid_builder-1.9.0-cp311-cp311-win_amd64.whl (624.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.9.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.9.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.9.0-cp310-cp310-win_amd64.whl (627.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.9.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.9.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.9.0-cp39-cp39-win_amd64.whl (627.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.9.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.9.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.9.0-cp38-cp38-win_amd64.whl (622.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.9.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.9.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.9.0-cp37-cp37m-win_amd64.whl (622.5 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.9.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.9.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.9.0.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.9.0.tar.gz
  • Upload date:
  • Size: 149.7 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.9.0.tar.gz
Algorithm Hash digest
SHA256 c56ea6ebb0858e706c42868d368302825c124bdf70bb4199710b56d86771b166
MD5 43f5a065f0402be615e9b48dbe813358
BLAKE2b-256 6bded4fa81887befd3d08d5cf0d124803d3d142dbde109c6825cae8b8eb896e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 eed0c5960ba464e0652448eada6d701a6d3e0d199926bd00a07a1c156dcdfccc
MD5 fb9d81f54764dd3e9f746f18f43fc119
BLAKE2b-256 4cccbcd617de26ec9426fb1d99ff347788799e3b95adeb6d94b60e05cd8aa393

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f91f02b486dae761bd97f3217198bef6b2a21f70500151c5ddb0460d6722bbef
MD5 e8f0015fceb8886533fcce2b86e3ecb1
BLAKE2b-256 2f0b1cea1b44ce2c4144e1310315fa91bc10f6749d5615a946cdc005edc2b7e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 33bd4d306a698fb5349f00898ec790c2d94c489d31ebcf92f9072a7f089eaaaf
MD5 86cf4242efa3c44d9dd30a33573ed0f8
BLAKE2b-256 884e24da173a74aafa5fd8d35fbb6ceb53c5f21d471adbc33df0bda30d94958a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13ac02b1f2f75ebc67b1bce8964614d25b26198769c406b533ce0d229de803ad
MD5 d1bab5c36ec9524efb95c0632a530227
BLAKE2b-256 1d4e71ea2b437e5d34d43274c7285abcfda545f4206388b0d531f4e03b72271a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cc1ba5a4a8a374146869245e9dd041aa50406c64e08fdb8e60947c9d254c9e66
MD5 074efe647ee0fee2d4dee05990495b8a
BLAKE2b-256 157d1527ff59043f585a2dc90d7678edd49b478834627d0f49868746c0b443ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0e0ff70c46accae8c3ec24a76206920ba9d40c54f3407c60b6c829799dc5a746
MD5 a80f0ea2830aa36dff9567be017c90fe
BLAKE2b-256 102363aa24e32905a28001492261354cc967ffa6bbdbba2306a237136a0700c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 084d72a67262c2415ad540499db1ae3cb73089e3059c994d737779f9c17dae10
MD5 c663400d2b65ff81d7fc45b2c205109c
BLAKE2b-256 537426f3b3a72df4e1803cacc17fb192df95f9faea5195c0059d877195cb46af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c360353baa9b59ce0e9c0ba83b4dcfd96758d876925bcb708ae006370595c7a5
MD5 5395dc32a2d920512014967b31b2dcc2
BLAKE2b-256 7e4d697cbfb202f91efca82051fd61d73db5aced52d83d8312c73cd0a3e2e2ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ea93ccb23c6cdf3452dd41d1ac44aace675675d6fe7fae91d9c8a98f3f0ed5a3
MD5 5fd6d2e040195784f9793e9dabd31f8b
BLAKE2b-256 54c847e81ddb461fb6f12ddc7c8d73efe660920a254a504a43504876a987a6d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 1977cc544519b9c6a39cba94d3ee72047434f01e9110d77664f1ac621ed9f64f
MD5 9104ab750abcdc14493c5877fd54dfd1
BLAKE2b-256 c1a14e6ade4163d7dad08a1ca6c0d95243074728181eda03176b1bc671cde1b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0a30098f8d2a2ad2b589976146429ac59acec77fa8f32dbe4a40b082658245f6
MD5 b365bce2bbcd9aee5aa3c11bd1ac1253
BLAKE2b-256 4d9d30322d01a75986502f073c320532be4f9b7e3812b35a4596cb1a3feefae9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 52b4ba00268c2f9ab850f60dd058ac7f8f25bdd3c2743594970fe210b4bf3932
MD5 9d89d9b1d5824c94a683310136c5d45e
BLAKE2b-256 e29cc311e0085f3635a95af23ad129ea36a550aec0dadf8bfd70258b237a92b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b601763d42342de8ee25cf1f4c16f4866a80d22d6d4c52acb41e8cdc5652ff93
MD5 3e37b3c409054208b3c5ae44e668c9b3
BLAKE2b-256 675e38ff6aecaee762275a379e7b00264180c4134cabd3e494c9b684c0fda19c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e128404c3233940f0a50921593067f6634a6cf9368aec1274e65b19bdb82b05
MD5 3d9c631c530c8a98c39386a32cecd37f
BLAKE2b-256 bfcece82602024010e9b84a6057ec2294f29d3d2deea881b96034b4f16e5bdd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.9.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 38582d15c8a68c933dfbf07bb08f8d78cefe13006d03a4869036fbe5971fa711
MD5 39ad05e9c87f6f57cbf3369613c0ae40
BLAKE2b-256 a56e6faff53142e7fca5aa3e35cc5f9cf7bc2d61522a8f8e2cfb850996dfa594

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