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

Uploaded Source

Built Distributions

threedigrid_builder-1.12.1-cp311-cp311-win_amd64.whl (625.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.12.1-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.12.1-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.12.1-cp310-cp310-win_amd64.whl (627.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.12.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.12.1-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.12.1-cp39-cp39-win_amd64.whl (627.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.12.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.12.1-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.12.1-cp38-cp38-win_amd64.whl (623.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 macOS 10.9+ x86-64

threedigrid_builder-1.12.1-cp37-cp37m-win_amd64.whl (622.7 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.12.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.12.1-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file threedigrid-builder-1.12.1.tar.gz.

File metadata

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

File hashes

Hashes for threedigrid-builder-1.12.1.tar.gz
Algorithm Hash digest
SHA256 09a545998acb2ad6b195db042db81edc0c4bf52138aab6ea5576ed5ad9bdf25d
MD5 b1d0160c53c6d320709d2a359058bed2
BLAKE2b-256 4270b1a1b4aea532881b6aa19ed232b801f8b9689db34f52aa72606846a40bf7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c08151497395a13d5e1beb47208cd1846ff22fe07759cebf7af023a129538303
MD5 f96915bf8323d1b0c0047882ea7ced61
BLAKE2b-256 2a5e00b18b35a7f0c07f6cc3390868948bd93b3c58d5a8a154322187dc9d5c84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46fa4b7fd529785391a1a4f28a0e24856776716e752695f46ee571bb6005b948
MD5 35eae05f15948de5e1ff24fda7bc9e23
BLAKE2b-256 518be1c363ef00490e51e8377ebf84135e3ceb9fb6457c37733c7fc7ddfbf6d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e9a5024181082c7d056a490a60deac0e3db5f59723249ff3897c4e7052540256
MD5 e227f2b5887bf5a289f51f4abf896039
BLAKE2b-256 041cf76870ad728a8833c1999c54112a6edac95790dc7a4dcbe05101c75f7dd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 826f115935207a1c2db7cd29eefc5a794d15733c51f6e226760f949f9bbba8fa
MD5 cb62e171486b1c4c7a4726b14d084b43
BLAKE2b-256 435c4307a12ee11e8ad97f9c785738406795f67f5abb38d69c7ffb200cdc140a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6647ccc1e360af1a6673c4a7d0a2981d46254c82e11df2efce7c2e56927e703c
MD5 dec4b1378fd15278a0c8747b9669e47d
BLAKE2b-256 362b532a1482b307b5cb8efca69aa0c1fddfe01015ffde1fbf16bfebddc92926

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 36004de87f8b4d261013cce9cffa17e4f7307cdac14058c8210a6d2adf31f195
MD5 763be944b7c8d1d6e3413774eca70775
BLAKE2b-256 d110e5513427c5f0bd8f1dfa7f855dd860a7a95b3aa04d291326b37c8c8ea1d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0dd01a1a4fa33d7434858c90f4e54157afe163d334b63bbcdc9c7f9df048063e
MD5 da87e5dfdf17a8a17bc07b0162815462
BLAKE2b-256 ae8f432412eadf4441519e3b7b94e7c53f542a5500f5a0c12aa3e16fd5e6bd07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 413824c28c6dd56fa15fa8cdb8e204c6c2140a0fb0ff90afdeef1f3058f46b29
MD5 4ec32d6ed4ff9c571dc9bc26ed4c03f5
BLAKE2b-256 531b58955e0f240467978540f65e0d141b832e557701716338b0b2329052b8e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 49a49b1a44c31af8eea9f5a94a70503924b10d146d5abb42bb24e9154bdc2d3e
MD5 b402723db26ccf4a2a36fdc4c2e39414
BLAKE2b-256 c00b116ccfd1a76daa871ee11bcf14881e3dfe5958060b62172212d939723ae2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 560d67598a5dbb3747a481df0eda6e35c3d00fcd3e515f3650a44cba619d545e
MD5 81807abb6ba0ef877388d5add9a05ecd
BLAKE2b-256 a6ea2617aebfba2e82332f01ee8c1b80e2523477149424a9a0a0234c48ca6b4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea6270902886a99c89789e31f851cac8d217bf8dbc33f8c2de35d2c30946cc74
MD5 556473e9d4a5d37bb5f4ff6e8b5a6d45
BLAKE2b-256 dc20bc17c88f5353e78b4e2a9832cc7a6560f5367b8ae657c08e80d3059c1b41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8bf7e349ab061779d9b4f676bdede2a09be4c9ae771718b5720801ae38873739
MD5 066b6474015afe18d3691cd8dfb57ac3
BLAKE2b-256 ee4dcfd3c368d17a2e6aa60d2618a7686df8f2cc8fb41d4f34b91234e35790da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 470216b15c043fa21e00aabdcde78a2af1a21136b5f154aaac5ea655795eb870
MD5 737fd0fb6da9b19483fec8578c7d62ed
BLAKE2b-256 43325113e984c342d51e9af80bd0b92935460427fadc97f7c4bb6146961cf7ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d47fbd943cdee71828d2f1542a06285d35d1c2fd1353a404ffa632e5937daaa6
MD5 bff74e8a57e4ce8e4ae94d62ce96fad4
BLAKE2b-256 58b9415c819f68f74ba96563ed04f9593e346cd53fca888143a0d11dd89e4ae7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.12.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7fb12ad2922c46d433a2be2ce1b3fb70817bfa0aa1b4a9b79c5b3ee95b627e4b
MD5 741d121c7e1fd05d8c29ec92bbfb4f73
BLAKE2b-256 639b299f78688d7130045976d3849df693bfda9183aba81691552fae73dcfaf3

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