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

Uploaded Source

Built Distributions

threedigrid_builder-1.14.2-cp312-cp312-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

threedigrid_builder-1.14.2-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.14.2-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.14.2-cp311-cp311-win_amd64.whl (618.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

threedigrid_builder-1.14.2-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.14.2-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.14.2-cp310-cp310-win_amd64.whl (619.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

threedigrid_builder-1.14.2-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.14.2-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.14.2-cp39-cp39-win_amd64.whl (619.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

threedigrid_builder-1.14.2-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.14.2-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.14.2-cp38-cp38-win_amd64.whl (616.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

threedigrid_builder-1.14.2-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.14.2-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.14.2.tar.gz.

File metadata

  • Download URL: threedigrid_builder-1.14.2.tar.gz
  • Upload date:
  • Size: 151.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for threedigrid_builder-1.14.2.tar.gz
Algorithm Hash digest
SHA256 20c2b1addeafdbe7a604d33c56c0b84d0309e700b030a38bad80a6544adb3d17
MD5 56cfaa9c879e95b1358c7e860ccc740c
BLAKE2b-256 20ac3237b4a99c120579d4c79e3ccbcca14989b3bf1fd7fb2a201d7ada7254f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 de33f15c44f583398f107e88b674e13f4d0f5417662b379905f221925083b574
MD5 c89d4efb4afe881014ecf36a0e1647f5
BLAKE2b-256 dd7dd6d65c4111ed8e76c0ee56d448559cdbb17cb4105ee63b4e8da48b7a4e5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f34ede3ec31bdbabd1cb4843ca2ba623801169783494ab177074320ffc839c42
MD5 e6e20b9a5b7ea773762a58db1f3341a3
BLAKE2b-256 df6ff5c764f5a7f1ee23fc8c0b0b41eebcc0b5d8e28d31818f582e35fe57125a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 58707032d7ac6ea9671a20493f622b12ea80c74781683e8b70b0a3fa0ce796e7
MD5 91952839b7daaeb3b8bd68197f1ad869
BLAKE2b-256 1fdf8ce0b21402708021a0c24e7d3afcf2f66563f9b1b3c5f4ff6221381dc042

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7e0858a9aeafad821d2d35f862e39103994d7e6587787982cdab05d323b17e1f
MD5 86815e83ad21290eedd53862134e6f5e
BLAKE2b-256 1779f3c8ef691769bc223a759169ef7b8c7964af23e6f4f85efd79c4343f3ea1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3b93db1ba0a203792e9c226aec47dd7e02adfa567af67031d812c6edcab1df23
MD5 f7f46283b6b5dc464aaf7fb3ffa83e01
BLAKE2b-256 0184cc155bb50a2a7c1b8c58100d89877cf18b9c8546ab2aa34b40bf71f7d52f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f1deefe94436ec69f4846e032c2d9e9afac00ba7497616fb70f50df7a3bc886b
MD5 bff1dbe138a5d640a9ac5035b9491507
BLAKE2b-256 0dbadaa5e96da0ca2634ed89b8d5808e83124e3a987fbe146b75190422b34e2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 80fc4f0a696302c3c45109f1fdc8794cad906c6e153dfc214fd34765554408c6
MD5 dd24c2fbac9b5397804a9573b01f08e4
BLAKE2b-256 9484a8c86a28d4465ee07b49fba6b69b15b5aa7f9793e7e92d866490b1b7cf55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 75bbfbb9ee02e071284ff170f00f90b317e505ded924f38454af8590fec3c354
MD5 bebd9a2263697e153732e94658122077
BLAKE2b-256 91e42548c3aa1f570e2f59b96cded75296d38462acc3fba027c3d666bf06f486

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a9f4a69b58a74ed93a6698af12eaac2437edf3c84b4e8e941b01b60d67425ca9
MD5 b4730e1e4be415281f812c428069aa37
BLAKE2b-256 760a4f9411e9dfe3a143ace05da7e373729302de7e9210cebd09fd0dae322920

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 137998c6629b78ee059b5deb37f4717383284595ad69f09457d4c5eb56ecd3ef
MD5 d64a2e6440da4904a87398f5b91a21e3
BLAKE2b-256 9e64b512eac26e450ea21b6bde2db477d77755a41ab5dd0f04074b0c6531d81f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a2dceac6a8bee1b9b671efc1099770f40e830995359338e28d676964afdffc7
MD5 3c56395b109a596f9c8200ec21114854
BLAKE2b-256 5127a804f05a1b1e3b586ee88691eb4789de426f3e9b24934ff42bc6ae7b331f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f8de96a7f3e9d4104886b52ec326dbfbb18c9e15e3a4884ec9659739f4dfdd93
MD5 a0a9395630bb317596a3afb3ccba50c2
BLAKE2b-256 b93ebd24d31868e033341f1fe95648145d529542fcf3cf849cbae92cc1f32f2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 11d8e116dd82982c3698a4480bc97c8e65a721b4603d86c5bfaebbc53a2a040d
MD5 6f4df6058676969051d07b7082bb82ba
BLAKE2b-256 5cd7c58f811b8edf3fb65944f07dcdd2c09b63d6bbad9df4afbe9dfa8f42b6ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2874795367fd4299ec0cd8636ec4b09e781d472e30b07fc1d7cd8b5bd4102a8
MD5 5a87a73a56ea703f14b8bfdba96388df
BLAKE2b-256 c902ab2f20e81cf0af7918e81388fe33d93d719f1c97f14010791d466010b322

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for threedigrid_builder-1.14.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c1ee2cfe9f67b96a2233e002d2df0bd49e981552c33dba8747da4b738f4f61c6
MD5 770de2b9243ee196f03ea7043295f694
BLAKE2b-256 7442d089f20acb7ed8561be0bdf2042bab3701a103d6a7c669481578eee9cd14

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