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

Uploaded Source

Built Distributions

threedigrid_builder-1.17.1-cp312-cp312-win_amd64.whl (624.6 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.17.1-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.17.1-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.17.1-cp311-cp311-win_amd64.whl (624.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.17.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.17.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.17.1-cp310-cp310-win_amd64.whl (626.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.17.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.17.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.17.1-cp39-cp39-win_amd64.whl (626.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.17.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.17.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.17.1-cp38-cp38-win_amd64.whl (623.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.17.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.17.1-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.17.1.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.17.1.tar.gz
  • Upload date:
  • Size: 154.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for threedigrid_builder-1.17.1.tar.gz
Algorithm Hash digest
SHA256 c7b569bbe4ddfccdf9482561a77b855f73ff7b18f6e4d049e39dc684a889b8aa
MD5 dc68dba34847f001a7bd9df723530253
BLAKE2b-256 e7c5b470dc82f5912f3e0aa6d56e639a56fa696e165f6b0259b599878ca18d66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 82ab03eb76a6bbf31cfeea4edf45cb478004595beafcf7b883b1b70036fe9380
MD5 5eac7354a0dafa2dd17ef9ba1cc37554
BLAKE2b-256 3e8cf54ec62a413f2954699a2200664bdf84680dd5b93baa76333a986a988d18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91f38fc41ff72046dac54076ac08bb4369e06a52d7158773d02cbff389060316
MD5 37e016ad61a701c0c80a0005e51c60f1
BLAKE2b-256 9549e08e810aee17d4bffe5d1fd8d626ef55db43a6ce6103efee35e928648d4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a4653a5d77a42da522a5aaa7af46d3077d284ee44d1ad42b7536df1155fcc52d
MD5 556c5ebeb6f8983257c0e875e9af0275
BLAKE2b-256 c536fd76694fdb5a21c9d3c9ce62578d19ffa49ffcba9d71744182a84d8d9e7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14a4aff556fb350524af8409f4bb6eb94b1c5a1730879affcc3776380e3e7974
MD5 768ae0524f3e76fb6eba5127baea9a90
BLAKE2b-256 409b9cd900077640342d13b17160451243badb72e78d8c134b2d76ca003b22fe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b8c2b876046ca4fbb89aa82ffc6bf6b645c50682abe58a4ef5f7b6b9dd79a7e0
MD5 d15f5f5fe6b315419c65c74536fa62c9
BLAKE2b-256 3d2e1acf7c854b2364123839a6fe6051506d18555a9a778d54590b6dc6797678

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 83aafca1d4b7b0ee97497333ba475666e913da6834e6eb762b5b2babb90b8e81
MD5 36721ee8aa6d17d198130f36e7c592f3
BLAKE2b-256 1751ec5353146395cf059e4964ddc42cd4885d1478c10ffecba3f29a228f3714

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 41486ea49f19321b02772b4119fcea77615b12b74537903259d444ffee59cd95
MD5 780f974b364a17426ccf2b20b73164ce
BLAKE2b-256 04b690c3eca3c3317e113aa39731ffba437d82e15dcdbe401e0463662f062887

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 24e06c136e399e1d6299c0a9b3e4c869084aba5878c833487fb13390aec10af8
MD5 d1ff55ef80742bab5ba45c7289e4e976
BLAKE2b-256 d06f19252e21244e19adf6816cbc6b9d5f1f3cae72b9bd62f1f7da1bc484c9b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 509cdaf323a2177ddaa236f4998bb19adb0d6d9acf07c32695be1c268bbf5042
MD5 e477c98df60c00693336c3541e0a0636
BLAKE2b-256 36bd1b67bdc8e073aa00d23e424bdadcf8ecdec7fcd6b3f02e189b1c755b3fc4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a13b03012f05d5b3e609512df576bb9cef600b5ed3d8b366d0857b2a92e600eb
MD5 da5819e944bd1ba65da8a60fd0baf800
BLAKE2b-256 fee315a630b4cfd787bba84fb43beac7a25ae29c2b417ad7c4cfadae129a0819

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d602adf6614117bc046076568724661a022c72d3d39a07581697ad94a7966bc
MD5 3c36f59cc931b495b5d53c78c7890a00
BLAKE2b-256 1a99ac357e7be398d65d079fbc489b6d0cd5f527da006c212086d901da72f949

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f9729cf56fd3a2cf3f48798fec4f85d37c0e74a0760c2d93df113a4ebd906f4a
MD5 61fd45f2c02daa5bff0dc563e422980d
BLAKE2b-256 29949a83c8add7b47f6be9ed905fd30782df52bbb00942ea5da1a5221ce0c7b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 36a959c470a3ccfe58c07e09a83c8ab1da8dd91c7c9b780bb56ff2c6032e3199
MD5 b4b96579bd41771cfb2598c4b17389e1
BLAKE2b-256 e67c015f97fcde36d122bef76a9dc2582b0b91543716244bb4e86e2942def0d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 192bf098d24b67bbd7c1439f32b75ba34e2f38f5beed3e005fb6bff3d098f755
MD5 459021f0d7575b87d7d514b46f115b7a
BLAKE2b-256 5367a3f7e0ec8936a2882c97eb1e595ea91c3a5de4869d023064bbc8886d6ab7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a058e2ca010c414f4454f6d2397e1e527d3c960194490c2592209ef2f1a43752
MD5 222abee2207e98dad4f0fb47235b4d7d
BLAKE2b-256 10841f8af6f65700a4a1323f78bbc83e5f89ef041287c90fe4cdfe7a5cd97019

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