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

Uploaded Source

Built Distributions

threedigrid_builder-1.8.0-cp310-cp310-win_amd64.whl (634.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.8.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.8.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.8.0-cp39-cp39-win_amd64.whl (634.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.8.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.8.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.8.0-cp38-cp38-win_amd64.whl (629.6 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.8.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.8.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.8.0-cp37-cp37m-win_amd64.whl (629.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

threedigrid_builder-1.8.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.8.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.8.0.tar.gz.

File metadata

  • Download URL: threedigrid-builder-1.8.0.tar.gz
  • Upload date:
  • Size: 145.2 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.8.0.tar.gz
Algorithm Hash digest
SHA256 34a37a0839b4dba116fb44e9fc487cf62b7349e21680a4b4686f5b2f314bc901
MD5 7990e9177227f09bb1ae3f1b0d0e2d70
BLAKE2b-256 2ce19e264cac9dd3136894d0343e718af980cb8a07cf16a29809269d6ad4546f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a2e9a3b6afdf845938f6092f7fd301aa5ca76d69205ae46801d060d80b70471b
MD5 8d6e2039e4a88f306f6f5d063743ea61
BLAKE2b-256 e415f593a65bde16dd6568870b3965b4a958e5f915fb8386c77866ec3ca4964c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8dee081e3a5f8f7df18538c7ab33678bc0291c752e482a868eef819cadcfe5b0
MD5 7f800c13c68c8bcd3c2922d3961d2d3f
BLAKE2b-256 f152c82afa01f9e8a62c68824ca18c4c2360fbcfb78d775c3705149dea4b3665

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dafdac258ce6fb2c031402917ce28153c966696b63c206554df0a584d4a1f3ee
MD5 cd2a4addb0be51baba0a56d50c129a05
BLAKE2b-256 8aa5514d4a02a923bb121b0135b58fcef913db737ad617e8efe9c3eb9ef2c3c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c59a3749824e2ec112c7527596d1635a4f161457eff0216cc81062d64fe1b703
MD5 31a812916748061cc6424d7d69592095
BLAKE2b-256 72e405217659d428f2772a6f78018587da68d5f23b73515075f57b29f87fa8f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 81bd390f08b312847d49d0e962f8bcd37ec39745ec8f65104bbffb40cc26e8a6
MD5 99e947aeaefe2c00f0f3ee0d16fae3a1
BLAKE2b-256 364addc147774792df48050bd282f6181d985b013db4183447117a908ef12865

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c4e13c09cfed8d8b879ebfae9cee1129edf435d6d0e83519bbe10fef31181af2
MD5 d48a35f25de4ff14c43813cec3755940
BLAKE2b-256 e440d1593eb0be2ec5a452de66b5368632c743615a35899488f1bc6704137c20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f8f30e0e135c326c0a13e9f54dcd2d4fd6f24d0c04ce101d1d00c2538a5c047e
MD5 3433ee6898a58bb194a7dc1a61d35bf8
BLAKE2b-256 42f1c87018295f9948dcec850e683e7f241fbbd1a7657eea93715a759270c16e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c22a64709f01c10d38a2164c37791d2939f790c1d1a2bc8dbe9e8b639f756e2
MD5 0c123e1ce3501af4e7de7a69f312beb0
BLAKE2b-256 f5acff78d3ffaa2ef5bfaadaa0dab1798487a22ade0551f435b109b2a808b98a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0869f42123f5d09e5f9d0c45e323d89cc0df578819a743a690a2d6d37d674a85
MD5 6d7e59b6b871e99d22699eb65f560109
BLAKE2b-256 5e3bd88bdf52a7ae657d7db67e4583087b99f34a23d7ee0318edef73aa6e8a26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2fde1b89d78ceec95ef13d7173f5faa14169b50218941a81ae014095f8bc47cc
MD5 c2ad9044dc648973de9a8a107ffab37e
BLAKE2b-256 5d8297df0126c25df664c71b6563790a1e1ef79419de94ff6ff1b3fd2cf2185e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc679f0de1768a090c37c3bd916c3f82d44a9d851f06f8e0c61f97392b320601
MD5 a6084eae12ba02bb60cff4a2092bbe25
BLAKE2b-256 bda802af66d7be0944367bbd8437f4c244348eaf3c257219292a7e3e23874f5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.8.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 508a2129ecad547ebd1fc13bf22d4bb85cf8f15af05c71e58b51b388badc2f0e
MD5 8757488d120ff4000359aa385eba0b8a
BLAKE2b-256 b14f1cbf61c833c973614864b7a73c9727ddfac517f0388e4c6d5a059b85d14b

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