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

Uploaded Source

Built Distributions

threedigrid_builder-1.14.4-cp312-cp312-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.14.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.14.4-cp312-cp312-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

threedigrid_builder-1.14.4-cp311-cp311-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.14.4-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.14.4-cp311-cp311-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

threedigrid_builder-1.14.4-cp310-cp310-win_amd64.whl (619.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.14.4-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.14.4-cp310-cp310-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

threedigrid_builder-1.14.4-cp39-cp39-win_amd64.whl (619.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.14.4-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.14.4-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

threedigrid_builder-1.14.4-cp38-cp38-win_amd64.whl (616.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.14.4-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.14.4-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file threedigrid_builder-1.14.4.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.14.4.tar.gz
  • Upload date:
  • Size: 151.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for threedigrid_builder-1.14.4.tar.gz
Algorithm Hash digest
SHA256 d14500e40842642d6ef106d0a297f024d094c384f7ab40aa9c2aec1261892d8b
MD5 8af92d6079778b6abadb954a054e8a61
BLAKE2b-256 047fad743850a0ec01e18c7b4b22bd681bdb8f34aa8212e5d59b52981b987b66

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.14.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 10a96e26b848044f2c94f53264b248849bdb027b6e03eeee4e167386ae279879
MD5 879bf629179d22a67e0db82834e5b5a3
BLAKE2b-256 6cd8e3d88ad1c2e46562585565f241dba53c089d9d7ab45aa20f51d14a01ee09

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.14.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 55055c79abf3d4cf53852dbce36cc32b92214bf60cf5e45a107b6326e38146c0
MD5 342fe0d8e00c717ff4746ad6aa39a048
BLAKE2b-256 da866603905deeed966584c7b8d1367c03034d4bc347e45dad9989f8a0576112

See more details on using hashes here.

File details

Details for the file threedigrid_builder-1.14.4-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8f0e4a541e71073eb060a66bd50d532ffe6c6738f5592fa31d41213858cc2ea0
MD5 7d39af235c587c5883d7f07484f48dcd
BLAKE2b-256 8f7482f761a39335ba6497cd049691b2880c6cfb1003155e57d1ad1d3ca3f618

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d6e5722aba35fdb3187687dc69a33ae58dab158a72fd9436214e740cc6749070
MD5 2da6cee4e33406f9abd27958061f3e4c
BLAKE2b-256 cfb59cfcbf4b6fd29ea0c375a066079fcc41ce68b3b32dff21e20f63fd616815

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa3c967d544cc76972a26620cf23be01336d04dad354cdc9b1d153cbe9cf2bda
MD5 5bfc921a476c907734e74cde6fdcdca2
BLAKE2b-256 038b86949535394f934a78c8abc09ff1968c0b44bbb06547e81022e4d894e8c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 22547ec8252e12070e396f10f720ae17a338fa00564667141870a9e46932c27b
MD5 a16643d445ae4fac64106231ba8b1c51
BLAKE2b-256 1d1dc14bd9cca4bfb09fcafe4f2483064ca4b224a352a6265c6314f82808cd3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4243094fd0e36ce3a3fd06c85dc6ddf820aa13815b1668e34342ce49d1aaf4e8
MD5 edef386dd1bcdc0fdcb585d11ddb5302
BLAKE2b-256 d5d176e49585e38caf346f8e7d437660db2d8b4e8a953e7c6bd60ba333803686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9be61c466df799e775944b81ff6673b00e545f7b4a9df9de15c1473a9614efa9
MD5 a24daa8f79dfacde444d121be38ac24d
BLAKE2b-256 bd8cdb51b687ee80cf28787f7b862b62e77e096001513176252d824384d2739c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec5d88dc249c8f866baa43223c936bc31025decfa03b0d2b76b6aaa1ee8079d7
MD5 4e0636f6eca54f0de2fe98899f11c040
BLAKE2b-256 07ff2b67e895ade6584a8dc2610185caa019252535032f4633400198d8bb87bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c87e3703e84844381184828da6a9fe5f24f2d79e55c030b5b81d122c7887cec8
MD5 31f0fdddc3f07e83eca26d36412d344d
BLAKE2b-256 75b77849ad6f25e17f72f4c7e411b36b456205db2c501ad495bfc97c1cd3b813

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bee7cb9079e8e381ccdde27782415e863c79d31e2d4fcde00dc76e3caf87ace9
MD5 8a8fc5f70f02a4018e83332d1d14fb84
BLAKE2b-256 be4d433aee868c4a1bcdc44093af52b36e77157cad58dfc44577b13256057190

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4708847e3e2e79f00ae9e3df64845b73e1966d2f8f4791165d0d7f80bc42ece6
MD5 fc1762790ad9f3a4a9f1508942353137
BLAKE2b-256 f7592d0188f2cd758a4f4d22edd63c74a4363f6f23e49ac2a29b1ffb00afa92e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 224c0f06463e988d9de20df859046574c4d3a7529b07d978d1ff1b2b52ed7466
MD5 d88d63ea5a0be885a047984e527b90cc
BLAKE2b-256 aa23f0c7b6a51d462a0f28bbdf801b465d3526012c7b19d18edec4c2b3880d82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b6edc6fe2829e06f5755ca5296b369febd9f232886765cb34737861df120dab
MD5 9a7a20a204c1ae7c7db4a64b5ce7c0af
BLAKE2b-256 0b228868b2266baa2f8f9747100232807de4151fd720322ee5d5d724d6415d63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f8aea51f98ed91e103b760da5b36f66a0fc7da7bdd67d0a60f2b9184df2e5bc7
MD5 f4eb32605fe9b4227f9ac3f890bdc91c
BLAKE2b-256 6265907d17b7ef7c16a28c046cff38aa8d37d256a2c3b80813cc2e9c3b7f6e94

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