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]

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

Uploaded Source

Built Distributions

threedigrid_builder-1.4.0-cp310-cp310-win_amd64.whl (621.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.4.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.4.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.4.0-cp39-cp39-win_amd64.whl (620.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.4.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.4.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.4.0-cp38-cp38-win_amd64.whl (615.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.4.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.4.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.4.0-cp37-cp37m-win_amd64.whl (615.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.4.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.4.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.4.0.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.4.0.tar.gz
  • Upload date:
  • Size: 135.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for threedigrid-builder-1.4.0.tar.gz
Algorithm Hash digest
SHA256 f9ef37011703fee55eb9ef1dcda73fe19a3b80c6d07f8584a4c66839edbaf4d8
MD5 a21813648675fcbfafdc3c9c9ecdee40
BLAKE2b-256 ec2dd066daf2955ac4f720f5d01c1fd2808cfbb4a855fbe7174a1c8941b994d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0b30a6aa0bcd501041e19355e6dfc32f821ad7ad795ca4242db404a5677199cd
MD5 7db53151c7c1d665fee3ff4a1f26bcb3
BLAKE2b-256 c75f15026e0ae0e0c1cae57513f69275619d3d94cf9b039d322d12aff0de9321

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ceced04099da8f46c1abb6791c154cab76bbc9389a6addfe50d7b1d5ed2447f6
MD5 15afb89e77dc837faee52c7bbfde866b
BLAKE2b-256 f81d6ef4b6f3bcb7c73bc8ee0879c466ea98e9596d87885ca7e1681743a242c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 28b801c633942809a972586cf0ffd1ca7f6550e95139d7b2aa3723a2d201c992
MD5 e9b47c513919898530b7b79a3acbde8f
BLAKE2b-256 8358668629424616dc2f05995d44456bc87d6c55e01298f9054a9b21fb4c373e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e2f6806bf5e9694c68bf3aab3618cc84b5fa59beecae9975b290fe6b2c1ea99e
MD5 c7294bcf33b810d4c33cb7a635cbec45
BLAKE2b-256 96c8c9191e91b7b27fadfcac973615f260f6e3ece25f4f9d8328df750f953c48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f4cb858aac63e0bbddb580882ee4a81b396f809fa5c5ac77af861cee7979b2a
MD5 d168df354dacbba37187e2d1f0edfaa8
BLAKE2b-256 52c7f9e1f58b860db71dc2a7d0517933a982b1f0d606c9ba9472bebd3b9025aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bd89d16fb3ffaa2d4791767f03e1a5ddc70eb1ece6ab214bd2053783959c449e
MD5 840c5c3f25161f9a93d7e42b8154be76
BLAKE2b-256 8ef19bab8eaa4431fbd84ca495e6cbe113d72dce504e4c3d4bc80bd4bf0965f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a0930d54ea3943af99af6ad7f7334113466fe20c36563b85749f779ba3f44b8b
MD5 34eec281d60b1e5e20f5841a71814fd9
BLAKE2b-256 ed3efc0cd02a5ff962029325b05615212dd823c42b6c0eacf07788fc7e29f92f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7ca3cd8c8ececa732a5241f6af179e56cf9430f6560af3459098ac17c3067f0c
MD5 f941eefe629c460ed68177f5f63057ef
BLAKE2b-256 6324ff3e9f0a8ef2a89e4b6a3c02389063ca77ce852f71c54ca9ef7f4b97c78e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ad66b4b90fca9c9b9144253990ae07410af415ed1020e832d9bdd9e37fb10e3e
MD5 8a5e4f0f72fd0c19804d260255475f2d
BLAKE2b-256 e295977cfb071d783a3063c2f34992244b882123dd02632157b27182b8ca0653

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6d7c24578e7a566e80aa1bc4e5c59d5032dc0066442563e14e76f2d580d2643b
MD5 5b6cac6cd83ae0d1121f233e3e3a3a37
BLAKE2b-256 1821f2ca084254ce01b8cf14e5aea3ffe9c58cec964a00d03a2b714d860a719c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6e86b8a1b5f63da4e6540507a86086159fae9004c527b3d14edf49d7ad89427d
MD5 b971669fdb8db6048b9c2cf841f924af
BLAKE2b-256 0cd5ce47f32de090726adfd35f584d1430096aa5a8a9be274e72d160f567aef0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c7a589e5f32029cde072fff0bea356d68d48420a78091e40681d66b064b278d6
MD5 847864049e25c175fad26605d13bb42e
BLAKE2b-256 2ac12f7f855460d1988104edbd66ae4320f6e1eba207e1db162712f9645f02a1

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