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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

threedigrid_builder-1.7.1-cp310-cp310-win_amd64.whl (634.4 kB view details)

Uploaded CPython 3.10Windows x86-64

threedigrid_builder-1.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

threedigrid_builder-1.7.1-cp39-cp39-win_amd64.whl (634.2 kB view details)

Uploaded CPython 3.9Windows x86-64

threedigrid_builder-1.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

threedigrid_builder-1.7.1-cp38-cp38-win_amd64.whl (629.6 kB view details)

Uploaded CPython 3.8Windows x86-64

threedigrid_builder-1.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

threedigrid_builder-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

threedigrid_builder-1.7.1-cp37-cp37m-win_amd64.whl (629.2 kB view details)

Uploaded CPython 3.7mWindows x86-64

threedigrid_builder-1.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

threedigrid_builder-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: threedigrid-builder-1.7.1.tar.gz
  • Upload date:
  • Size: 145.1 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.7.1.tar.gz
Algorithm Hash digest
SHA256 c11755ea0021c72ac64d6a9e1b66f61f47c2575e6ed36a5cafe69fee2abdf87b
MD5 62f252565ffcbd7ff9235903c94054f7
BLAKE2b-256 8fcc9ba298ed17b895493a5b2718cc2e7ee8d8af8176588b8a4a16c0ce476ce4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d3e301bbf134576a0481c4f0e3164bf2cd486a88f465100cf7a34d80e7307b7d
MD5 446b0c75526cca6c75fdcebae7887e10
BLAKE2b-256 a1d01937806014d41af616bc8c80b8c99d5be01e4058d701c730e48dfbf198d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0d06ca89d9c88397b328f890b2ffd8d0f95ee0e505ab856b2da766c300b4fe07
MD5 0c8773cad3b08043bb9882eb66305ac6
BLAKE2b-256 d9669d3b7c89f160663937eb28497584266724d1bfdefb52f60868780b5fd830

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6d87d0eca4bc3fa41aaf21e2ea3dde26e519305393217b272d30f298513710b7
MD5 31945c7ed043ea6c3f04cb0a58f34650
BLAKE2b-256 a39baf40a3bb8358d574c63c604496ea608e5de34279d8a5b1373ef537b5b996

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2d85cac0d7517d2d96b6c330d5e81a03f39c64c47d82624a9a58a129adb32de9
MD5 81cb1f23e40e53240a6248ceb16a5ec7
BLAKE2b-256 e74e11b16d0add4521bbf5b217769752cfb22aa11c4336f859694b0873ea3c96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 666e718adef9b629b8c14669a446938b43a0670de1de8e707bcd23ba89965c4b
MD5 02ff1ecca36793ce43f19bc360823658
BLAKE2b-256 c1f334610efb9e1e3414bf0927e3fd9e7b814ae974c827dd8b11d2f24c30b04b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 16627e1b01181d6ac0032ba8aeebfc0affb88d59925e73c2b59bda070991fbf9
MD5 1013bc617e26700a75d1d4e1801ccf2d
BLAKE2b-256 ae5e1699eaa105e728cc05e75fa67ef28a0114ac84771ba24d79e751d704e15c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 8cb786ecbe36ce17627bc9b9ae8548cd9fb7ca6f3540012db58e7b2e2a26a128
MD5 6961e916a5701da60d308ffb59128583
BLAKE2b-256 252f930ddf303952959dcffc550f75c94b3d602cd0bce1bab6992762579a7329

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd98d1ca11fb969a8feeb1cc2cb61951d4d60f862a2758dc23af989d18de6aa9
MD5 1cba3c6f1599429d50c69eae34f1160f
BLAKE2b-256 ed0e87bcdcfeaf6fb22f5eea6a1c1b311276f5a30949b2043b1a322ed6f16dc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4d7732399ad21315bbee5ac224728a42a8f6f5d968e79de156431c5afe4eaf88
MD5 caa596b105b6abac57c5709c2cade8b0
BLAKE2b-256 9d7ccbb8cfe5487d861e0f7cc72c93caa26a62253edebbe164b5e658c88272cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 508decdde4d625220c47235f28c09164cdc8e65ab926168b181e43eb6771c2da
MD5 67a17bfe453d5d1be879c4ad047c13cd
BLAKE2b-256 e4c5a7a0e3057f542c8e72b99799a0db6babad1a193b5b4be33fc6c18b975729

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a973e7f39404858d3f757f625dae702de76a7c4172be5858425ebed31d83ade
MD5 0fb2d7042ef67907f482257a7d1d4659
BLAKE2b-256 2717a169c367a8918abb6603137002b4e32ec69085138df87c5e48a846bc91ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.7.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cb60b607551d99a3295b599278d407605571c37588ca3c505a6827ceab498a81
MD5 92d68de69ee364ff696b9a4a4049ae53
BLAKE2b-256 426270c9ee3937ef1512dbf808d36adfdafdb3a5d58b980200a6a5ec976c3a57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page