threedigrid


Namethreedigrid JSON
Version 2.3.3 PyPI version JSON
download
home_pagehttps://github.com/nens/threedigrid
SummaryPython package for the threedigrid administration
upload_time2024-11-26 14:59:13
maintainerNone
docs_urlNone
authorLars Claussen
requires_python>=3.8
licenseBSD license
keywords threedigrid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Threedigrid: The 3Di grid admin framework
=========================================

The Python package for the threedigrid administration.


.. image:: https://github.com/nens/threedigrid/workflows/Linux/badge.svg
	:alt: Github Actions status
	:target: https://github.com/nens/threedigrid/actions/workflows/test.yml?query=branch%3Amaster


.. image:: https://readthedocs.org/projects/threedigrid/badge/?version=latest
        :target: https://threedigrid.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status

.. PyPI

.. image:: https://img.shields.io/pypi/v/threedigrid.svg
	:alt: PyPI
	:target: https://pypi.org/project/threedigrid/

.. Anaconda

.. image:: https://img.shields.io/conda/vn/conda-forge/threedigrid
  :alt: Anaconda
  :target: https://anaconda.org/conda-forge/threedigrid


* Free software: BSD license
* Documentation: https://threedigrid.readthedocs.io.

Overview
========

Features
--------
- access to the threedicore administration by a single instance of the ``GridH5Admin`` object
- query the model data by pre-defined subsets and django style filters
- export model data to gis formats like shapefile, geopackage
- serialize model data as geojson


Quick start
-----------

The standard threedigrid distribution is pretty lightweight, installing as little dependencies
as possible. If you want to make use of all capabilities threedigrid has to ofter (e.g. spatial
operations and command line tools) install like this::

    $ pip install threedigrid[geo,results]


Console scripts
+++++++++++++++

Using the 3digrid_explore shortcut, simply run::

    $ 3digrid_explore --grid-file=<path to grid file> --ipy

This will invoke an ipython session with a ``GridH5Admin`` instance already loaded.

To get a quick overview of the threedimodels meta data omit the ``--ipy`` option or
explicitly run::

    $ 3digrid_explore --grid-file=<the to grid file> --no-ipy

This will give you output like this::

    Overview of model specifics:

    model slug:              v2_bergermeer-v2_bergermeer_bres_maalstop-58-b1f8179f1f3c2333adb08c9e6933fa7b9a8cd163
    threedicore version:     0-20180315-3578e9b-1
    threedi version:         1.63.dev0
    has 1d:                  True
    has 2d:                  True
    has groundwater:         True
    has levees:              True
    has breaches:            True
    has pumpstations:        True


(I)Python shell
+++++++++++++++
Get a grid admin instance::

    from threedigrid.admin.gridadmin import GridH5Admin

    f = 'gridadmin.h5'
    ga = GridH5Admin(f)


The grid admin directly holds some model specific attributes like whether the model has a 1D or 2D
or groundwater section::

    In [4]: ga.has_groundwater
    Out[4]: False

    In [5]: ga.has_1d
    Out[5]: True



There are different types of filters but a filter, generally speaking, acts on field. That means you can
filter by value. If you have a line model instance you can filter the data by the kcu field::

    ga.lines.filter(kcu__in=[100,102])

or by the lik value::

    ga.lines.filter(lik__eq=4)

The filtering is lazy, that is, to retrieve data you have to call data explicitly::

    ga.lines.filter(lik__eq=4).data  # will return an ordered dict


The structure control actions netcdf can also be analyzed and exported using threedigrid::

    from threedigrid.admin.gridresultadmin import GridH5StructureControl
    from threedigrid.admin.structure_controls.exporters import structure_control_actions_to_csv

    gst = GridH5StructureControl("gridadmin.h5", "structure_control_actions_3di.nc")
    gst.table_control
    structure_control_actions_to_csv(gst, "test.csv")

Remote procedure calls
----------------------

Currently only the client-side is included. The server-side might be added in a later stage.
Note: this is an advanced feature used inside the 3Di stack, probably you don't need this.
Note2: you need Python 3.7 or higher for this to work.


Installation::

    $ pip install threedigrid[rpc]


Basic usage::

    ga = GridH5ResultAdmin('rpc://REDIS_HOST/SIMULATION_ID', 'rpc://REDIS_HOST/SIMULATION_ID')
    # Replace REDIS_HOST and SIMULATION_ID with actual values.
    future_result = ga.nodes.filter(lik__eq=4).data
    data = await future_result.resolve()

Subscription usage::

    subscription = await future_result.subscribe()

    async for item in subscription.enumerate():
          # do something with item


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


History
=======

2.3.3 (2024-11-26)
------------------

- Reverted string-casting of file paths in GridH5ResultAdmin constructor.


2.3.2 (2024-11-26)
------------------

- Added get_source_type() to GridH5StructureControl.


2.3.1 (2024-10-21)
------------------

- Add customized water quality results NetCDF interface.

- Extract area name from customized NetCDF files.

- Fix slicing of Id fields in customized NetCDF files.


2.3.0 (2024-08-07)
------------------

- Add customized results NetCDF interface.


2.2.11 (2024-07-25)
-------------------

- Fix NumPy 2.0 incompatibilities.


2.2.10 (2024-05-29)
-------------------

- Move _field_model_dict and its methods back to GridH5ResultAdmin.
- Add `substances` and overwrite `get_model_instance_by_field_name` method
  in GridH5WaterQualityResultAdmin.


2.2.9 (2024-05-27)
------------------

- Move _field_model_dict and its methods from GridH5ResultAdmin to GridH5Admin.


2.2.8 (2024-04-25)
------------------

- Add `group_by_grid_id` to structure control interface.


2.2.7 (2024-04-22)
------------------

- Set substance units on Nodes.

- Set exchange level on levl attribute on breach geojson export.

- Removed old gridadmin file from tests.

- Set pumps on start node and add line geometry in geojson export.

- Return YZ tabulated data in geojson export if YZ profile.


2.2.6 (2024-03-13)
------------------

- Add cross section type and tabulated data to geojson export for:
  channels, pipes, weirs, culverts, and orifices


2.2.5 (2024-03-07)
------------------

- Removed sphinx_rtd_theme from code dependencies. (#221)


2.2.4 (2024-02-06)
------------------

- Substance count regex fix

- Set substance name on Nodes


2.2.3 (2024-01-12)
------------------

- Fix 1D/2D data swap for water quality results


2.2.3b (2024-01-02)
-------------------

- Added build/release Github action.


2.2.2 (2023-12-21)
------------------

- Bugfix: **only** in case of **boundaries**: correct sorting of timeseries in all `TimeSeriesSubsetArrayField`. This
  affected: Nodes [infiltration_rate_simple, ucx, ucy, leak, intercepted_volume, q_sss]
  Lines: [qp, up1, breach_depth, breach_width]

- Note: The `depth` and `width` field are broken for `breaches` object. 
  Please use `breach_depth` and `breach_width` on the `lines` object instead.


2.2.1 (2023-12-05)
------------------

- Fix Lines lookup index bug for single cell models


2.2.0 (2023-11-07)
------------------

- Add water quality results NetCDF interface.

- Drop Python 3.7 support


2.1.2 (2023-11-03)
------------------

- Retry PyPi release.


2.1.1 (2023-11-03)
------------------

- Add missing init file to structure control folder


2.1.0 (2023-10-16)
------------------

- Added structure control actions NetCDF interface and CSV exporter.


2.0.6 (2023-07-07)
------------------

- Added `sewerage` and `sewerage_type` fields to Line model.


2.0.5 (2023-03-27)
------------------

- Switch to using 'line_geometries' for Breaches model.


2.0.4 (2023-03-24)
------------------

- Make 'line_coords' the geometry on breaches geojson output.


2.0.3 (2023-03-22)
------------------

- Bugfix: Dataset instance check is not generic.


2.0.2 (2023-03-21)
------------------

- Added 'line_coords' to Breaches model and default export fields.


2.0.1 (2023-02-22)
------------------

- Added `meta` table to Geokpackage export with meta information about 3Di model.

- Added 2D groundwater boundary line types 600, 700, 800, 900. 
  Eextended the '2D_GROUNDWATER' subset.


2.0.0 (2023-01-11)
------------------

- Removed gridadmin.lines.breaches.

- Removed MappedSubsetArrayField.

- Added 'code' and 'display_name' to breaches.

- Added missing Geopackage fields `bottom_level` and `drain_level` for nodes. Renamed `connection_node_storage_are` to `connection_node_storage_area`.

- Dropped python 3.6 support.

- Fixed compatibility with shapely 2.*.


1.2.5 (2022-10-17)
------------------

- Optimized geojson export memory usage.

- Removed majority of properties from the flowlines (1D2D) export.


1.2.4 (2022-10-03)
------------------

- Allow exporting flowlines (1D2D) to geojson or shapefile.


1.2.3 (2022-06-01)
------------------

- Divers Geopackage exports improvements.


1.2.2 (2022-05-31)
------------------

- New release since 1.2.1 was already present at PyPi.


1.2.1 (2022-05-31)
------------------

- Added new OGR based exporter for Geopackage exports.
  Currently only has default export settings for lines, cells, nodes and pumps.

- Fixed error in crs attribute.

- Removed deprecation warning on gridadmin.breaches and added it to
  gridadmin.lines.breaches.

- Fixed export_breaches for new gridadmins.


1.2.0 (2022-03-09)
------------------

- Added discharge_coefficient_positive and discharge_coefficient_negative
  to breaches.

- Removed threedicore version check on GridH5ResultAdmin initialization.

- Added crs attribute to GridH5Admin. Pyproj >=2.2 is required.

- Drop python 2.7 support.


1.1.14 (2022-02-16)
-------------------

- Fix geometry selection filtering, gridadmin can now contain nan values.

- Added dimp attribute to nodes.


1.1.13 (2021-12-09)
-------------------

- Added flod and flou attributes to lines for possible reading obstacle heights.


1.1.12 (2021-11-18)
-------------------

- Added 'has_dem_averaged' attribute to cells.


1.1.11 (2021-11-02)
-------------------

- Exporters now export NaN and -9999.0 float values as NULL.

- Fixed exporting string dtype fields (e.g. cont_type) in OGR exporter. For instance,
  the string "b'something'" now is written as "something".

- Skip the dummy element (with id=0) in all exporters.

- Set the FID (feature ID) in the OGR (shapefile/geopackage/some geojson) exporters.

- Deprecate specific serializers.py under threedigrid.admin.breaches, .lines, .nodes and
  .pumps.


1.1.10 (2021-11-01)
-------------------

- Fix GeoJSON levees coordinate order.


1.1.9 (2021-10-25)
------------------

- Renamed the 's_1d' field under lines to 'ds1d_half'.

- Added 'initial_waterlevel' to nodes.


1.1.8 (2021-10-25)
------------------

- Added 'nodes_embedded', available under gridadmin Class.


1.1.7 (2021-10-18)
------------------

- Fixed timeseries filtering with h5py>=3.1.x


1.1.6 (2021-08-31)
------------------

- Added CrossSection model to ORM.
- Added following fields to lines: `dpumax cross1 cross2 ds1d s1d cross_weight invert_level_start_point invert_level_end_point`
- Added following fields to nodes: `calculation_type drain_level storage_area dmax`
- Created new subset 1D for Nodes.


1.1.5 (2021-08-10)
------------------

- Release on pypi (repo has no Github actions)


1.1.4 (2021-08-10)
------------------

- Replace nan with null in geojson output.

- Remove requirements files, only keep one for development in docker.


1.1.3 (2021-06-01)
------------------

- Bugfix: geojson levees export also crashed
  due to 3.8.10 and numpy 1.19.1


1.1.2 (2021-05-28)
------------------

- Fixed only filter for aggregate result admin. (#121)

- Added cross_pix_coords field to lines.

- Bugfix: geojson line_geometries export crashes with
  Python 3.8.10 and numpy 1.19.1. Needed explicit astype conversion


1.1.1 (2021-03-30)
------------------

- Reduced the source distribution filesize by removing the tests.


1.1.0 (2021-03-29)
------------------

- Bumped asyncio-rpc to 0.1.10

- Fixed GeoJSON export with pyproj <= 1.9.6.

- Fixed compatibility with h5py 3.*.

- Added gridadmin.grid.transform.

- Fixed gridadmin.grid.n2dtot and .dx propagation.

- Added gridadmin.cells.iter_by_tile() and .get_extent_pixels().


1.0.27 (2021-02-22)
-------------------

- Bumped asyncio-rpc to 0.1.9


1.0.26 (2021-02-05)
-------------------

- Fixed rpc gridadmin properties


1.0.25 (2020-09-15)
-------------------

- Bugfix: crest_level is also inverted by Inpy. Use
  the raw value in the prepare step to include the
  correct (non inverted) value.


1.0.24 (2020-09-02)
-------------------

- Removed numba as dependency, since it did not really give any
  performance gain on Linux.


1.0.23 (2020-09-02)
-------------------

- Creating fresh release after upload failed.


1.0.22 (2020-09-02)
-------------------

- Added extra field 'discharge_coefficient' to channels and pipes. These
  fields default to 1.0.

- Bugfix: don't use the z-coordinate when making line_geometries during the prepare step


1.0.21 (2020-07-17)
-------------------

- Invert_level_start_point and end point where inverted
  by Inpy. After this change the values will be correct again,
  however present gridadmin files will still have the incorrect value.

- Added `Breaches` model under lines with specific breach fields
  mapped from the 'breaches' h5py datagroup.

- Added `MappedSubsetArrayField` allowing to map arrays from other
  h5py datagroups to a model on another datagroup subset. Breaches
  uses this to map the array's under 'breaches' to 'lines'


1.0.20.12 (2020-07-14)
----------------------

- Fixed problem with previous release


1.0.20.11 (2020-07-14)
----------------------

- Nodgrid generation bugfixes


1.0.20.10 (2020-07-07)
----------------------

- Added missing numba requirement in setup.py


1.0.20.9 (2020-07-07)
---------------------

- Fixed RPC breaches/pumps bug

- Added fast nod_grid generation on cells


1.0.20.8 (2020-05-22)
---------------------

- Add groundwater_cells to exporter for frontend.


1.0.20.7 (2020-05-18)
---------------------

- Added `content_pk` to the export_constants of all structures which have a
  `content_pk`.


1.0.20.6 (2020-04-15)
---------------------

- An empy array [] is returned now instead of None if there is no
  dataset.

- Line geojson items need to use line_geometry values

- Bugfix for `Model._get_subset_idx` not instantiating new subsets with their parent's
  mixins.


1.0.20.5 (2020-04-01)
---------------------

- Use 'ga.xxx.id.size' to check if certain submodels (like channels/weirs/manholes)
  are available for geojson exports.


1.0.20.4 (2020-03-31)
---------------------

- Allow older pyrpoj versions. (pre 2.2.0)

- Bugfix for timeseries start_time=0 selection and allow indexes=slice(x,x,x)
  in combination with sample() method.

- Added try-except surrounding all imports of the package `geojson`. This package is
  only available when threedigrid is installed with the extra [geo] extension.

- Add `ORIFICES_EXPORT_FIELDS` to export_constants.


1.0.20.3 (2020-03-18)
---------------------

- Add extra field `pixel_width` to cells

- Bugfix for GeometryIntersectionFilter: filter was only checking on
  intersecting bounding boxes


1.0.20.2 (2020-03-06)
---------------------

- The `sample` method needs to skip the last timestamp for SWMR
  to work correctly. (time dataset can have one item more
  than datasets with timeseries)

1.0.20.1 (2020-02-26)
---------------------

- Bugfix: reprojection with no coordinates (empty array's)


1.0.20 (2020-02-19)
-------------------

- Added `GeometryIntersectionFilter`.

- Added general GeoJsonSerializer which allows you to specify the field names
  you want to serialize and extract to geojson. The GeoJsonSerializer allows
  you to specify nested fields.

- Added a set of standard export fields for each model.

- Automatically pick the correct serializer based on file extention

    - .json/.geojson --> to_geojson
    - .gpgk --> to_geopackage
    - .shp --> to_shape

1.0.19.1 (2020-02-04)
---------------------

- Minor bugfix, need to check if h5py filepath is a str or bytes string
  during initialization


1.0.19 (2020-01-31)
-------------------

- First release with RPC integration.


1.0.19rc3 (2020-01-14)
----------------------

- Bumped version of asyncio-rpc


1.0.19rc2 (2020-01-14)
----------------------

- Fixed incorrect version number


1.0.19rc1 (2020-01-14)
----------------------

- Added RPC datasource which enables to use the majority of
  threedigrid in a RPC setting. Uses asyncio-rpc for
  sending/handling RPC calls.

- RPC datasource allows both one time executing (`resolve()`) and pub/sub
  (`subscribe()`) functionialty.

- Refactored to allow using RPC datasource

1.0.18 (2019-11-28)
-------------------

- Only use pyproj Transformer if it is present
  else revert to old transform method


1.0.17 (2019-11-28)
-------------------

- Added `content_pk` to the pumps model.

- Bumped package versions

- Reduced reprojection overhead of line_geometries.


1.0.16 (2019-07-08)
-------------------

- Removed max capacity from Orifice model/serializer.


1.0.15 (2019-07-05)
-------------------

- Fixed group update for default null values.


1.0.14 (2019-06-19)
-------------------

- Do not use ``0`` has a default when converting database objects to numpy
  arrays in the prepare phase.


1.0.13 (2019-05-01)
-------------------

- Fixed `_field_model_dict` being a class variable.


1.0.12 (2019-04-18)
-------------------

- Added sumax to nodes


1.0.11 (2019-02-01)
-------------------

- Bug fix in `h5py_file` method mapping.


1.0.10 (2019-01-31)
-------------------

- Added sources and sinks (q_sss) to threedigrid.


1.0.9 (2019-01-31)
------------------

- Manholes preparation fixed mapping in ``connection_node_pk``.

- Added `to_structured_array` method for retrieving (filtered) results
  as Numpy structured array instead of an OrderedDict


1.0.8 (2019-01-03)
------------------

- Set fixed type to the fields `code`, `display_name` and `shape`. These fields
  now have a fixed lenght of 32, 64 and 4 characters respectively.


1.0.7 (2018-11-21)
------------------

- Bug fix: dict.values() and dict.keys() in python 3 are causing some
  unintended behaviour.


1.0.6 (2018-11-14)
------------------

- New release due to failing uploads.


1.0.5 (2018-11-14)
------------------

- Add aggregation option 'current' to volume and intercepted_volume.

- Using a non-tuple sequence for multidimensional indexing is deprecated; use
  `arr[tuple(seq)]` instead of `arr[seq]`.

- Properties should be strings so we can use string methods on them.

- Do not prepare levees if there aren't any.

- Split requirements file to allow for finer grained builds (for instance to
  generate the documentation).

- Add 'intercepted_volume' to NodesAggregateResultsMixin.

- Split requirements file to allow for finer grained builds (for instance to
  generate the documentation).


1.0.4 (2018-10-17)
------------------

- Added BooleanArrayField for boolean values and use it for `is_manhole` filter.
  NO_DATA_VALUE is interpreted as False.


1.0.3 (2018-09-17)
------------------

- Do not throw exception on cftime ``ImportError``


1.0.2 (2018-09-17)
------------------

- Add boolean filter for manholes.


1.0.1 (2018-09-11)
------------------

- Patch for converting numpy strings/bytes to float for both python2/3.

- Dropped NetCDF library and replaced opening NetCDF files with h5py

- Bumped h5py to 2.8.0


1.0 (2018-09-04)
----------------

- Made threedigrid >= Python 3.5 compatible.


0.2.8 (2018-07-23)
------------------

- Bug fix for issue #44: use the method ``get_filtered_field_value()`` instead
  of ``get_field_value()`` for the count property.

- Properly closes netcdf-file in ``GridH5ResultAdmin``.


0.2.7 (2018-05-24)
------------------

- Add export functions for 2D to the ``export_all()`` collection.


0.2.6 (2018-05-17)
------------------

- Do not use ``pkg_resources`` to determine the current version but use
  zest_releaser to update the version string in threedigrid/init.py


0.2.5 (2018-05-16)
------------------

- Use the custom ``NumpyEncoder`` to convert specific numpy types to native
  python types when calling ``(geo-)json.dumps()``.


0.2.4 (2018-05-15)
------------------

- Introducing subset fields that can be used to query results that are collected
  only for subsets of the model, like the 2D section.


0.2.3 (2018-05-14)
------------------

- Fix lookup_index functionality for composite fields.

- Make model name property optional. That is, 'unknown' will be returned if the
  name cannot be derived.

- Changed Depth/width fields on breach-timeseries to breach_depth and breach_width.

0.2.2 (2018-04-30)
------------------

- ``_get_composite_meta()`` does not raise an AssertionError anymore if
  composite field attributes differ. Instead a warning is issued.


0.2.1 (2018-04-26)
------------------

- Bug fix: ``threedicore_result_version`` must be a property.


0.2 (2018-04-26)
----------------

- Added additional exporters for

    - 2D_GROUNDWATER
    - 2D_OPEN_WATER
    - 2D_VERTICAL_INFILTRATION

- Added method ``get_model_instance_by_field_name``  to the
  ``GridH5ResultAdmin`` class. This makes it possible to do reverse lookups
  in situations where you have a field name but do not know which model it
  belongs to. N.B the field must be unique otherwise an ``IndexError`` will
  be raised.

- Added property ``dt_timestamps`` to the timeseries_mixin module.

- The version number is added to the ``__init__`` file dynamically using the
  ``pkg_resources`` API.

- Timestamps of all timeseries fields are shown for aggregation results.

- Timestamps in the aggregation results are filtered when retrieving subsets of timeseries.

- Introducing the ModelMeta class. Its main purpose at this moment is to compute all
  possible combinations of composite_fields and aggregation variables.

- Fixed return statement of method slice (in class Model) which now takes
  ``**new_class_kwargs``.

- Empty or missing datasets are now displayed as ``np.array(None)`` instead of
  raising an error.

0.1.6 (2018-04-18)
------------------

- New release using twine 1.11.


0.1.5 (2018-04-18)
------------------

- Added support for composite fields which can be used to fetch data from
  multiple source variables as a single field. Like this
  result_3di netcdfs can be queried the same way as gridadmin files.

0.1.4 (2018-04-08)
------------------

- Changed ResultMixin to dynamically add attributes based on the netcdf
  variables.

- Added basic result proccesing for line/node data.

- The filter mask is computed only for array's affected and
  before applying it to all array's

- The 'only' filter works much faster because the filter mask
  is only applied on fields that are affected.

- The filter mask is cached on the line/node instance after getting
  the first value. You can thus do something like:

      queryset = gridadmin.lines.filter(kcu=2)
      ids = queryset.id
      line_coords = queryset.line_coords

  and the filter mask will only be computed once.

- Add click console scripts ``3digrid_explore`` and ``3digrid_export`` for
  quick overviews and data exports.

- Make ogr/gdal imports optional to avoid breaking parts of the documentation.

- Added documentation and setup for ``sphinx`` documentation pipeline.

- Use linear referencing for embedded channels to keep the original geometry
  intact when preparing line geometries for visualisation.

- Define extra's to make the standard threedigrid distribution as
  lightweight as possible.

- Convert strings in ``attrs`` to ``numpy.string_`` to fix crashes under
  Windows.

0.1.3 (2018-03-16)
------------------

- Remove property ``has_groundwater`` from ``GridH5Admin``.
  Should always be provided by the threedicore itself. Gives a warning for
  backwards compatibility.


0.1.2 (2018-03-12)
------------------

- Get model extent now always returns a bbox (minX, minY, maxX, maxY)

0.1.1 (2018-03-06)
------------------

- All imports are absolute.

- Added install info using pip.


0.1.0 (2018-03-05)
------------------

* First release with fullrelease.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nens/threedigrid",
    "name": "threedigrid",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "threedigrid",
    "author": "Lars Claussen",
    "author_email": "info@nelen-schuurmans.nl",
    "download_url": "https://files.pythonhosted.org/packages/ba/e0/3512a674061205017682838ac47a6083d57e8faa5a6f2b7541bd1298b9c2/threedigrid-2.3.3.tar.gz",
    "platform": null,
    "description": "Threedigrid: The 3Di grid admin framework\n=========================================\n\nThe Python package for the threedigrid administration.\n\n\n.. image:: https://github.com/nens/threedigrid/workflows/Linux/badge.svg\n\t:alt: Github Actions status\n\t:target: https://github.com/nens/threedigrid/actions/workflows/test.yml?query=branch%3Amaster\n\n\n.. image:: https://readthedocs.org/projects/threedigrid/badge/?version=latest\n        :target: https://threedigrid.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. PyPI\n\n.. image:: https://img.shields.io/pypi/v/threedigrid.svg\n\t:alt: PyPI\n\t:target: https://pypi.org/project/threedigrid/\n\n.. Anaconda\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/threedigrid\n  :alt: Anaconda\n  :target: https://anaconda.org/conda-forge/threedigrid\n\n\n* Free software: BSD license\n* Documentation: https://threedigrid.readthedocs.io.\n\nOverview\n========\n\nFeatures\n--------\n- access to the threedicore administration by a single instance of the ``GridH5Admin`` object\n- query the model data by pre-defined subsets and django style filters\n- export model data to gis formats like shapefile, geopackage\n- serialize model data as geojson\n\n\nQuick start\n-----------\n\nThe standard threedigrid distribution is pretty lightweight, installing as little dependencies\nas possible. If you want to make use of all capabilities threedigrid has to ofter (e.g. spatial\noperations and command line tools) install like this::\n\n    $ pip install threedigrid[geo,results]\n\n\nConsole scripts\n+++++++++++++++\n\nUsing the 3digrid_explore shortcut, simply run::\n\n    $ 3digrid_explore --grid-file=<path to grid file> --ipy\n\nThis will invoke an ipython session with a ``GridH5Admin`` instance already loaded.\n\nTo get a quick overview of the threedimodels meta data omit the ``--ipy`` option or\nexplicitly run::\n\n    $ 3digrid_explore --grid-file=<the to grid file> --no-ipy\n\nThis will give you output like this::\n\n    Overview of model specifics:\n\n    model slug:              v2_bergermeer-v2_bergermeer_bres_maalstop-58-b1f8179f1f3c2333adb08c9e6933fa7b9a8cd163\n    threedicore version:     0-20180315-3578e9b-1\n    threedi version:         1.63.dev0\n    has 1d:                  True\n    has 2d:                  True\n    has groundwater:         True\n    has levees:              True\n    has breaches:            True\n    has pumpstations:        True\n\n\n(I)Python shell\n+++++++++++++++\nGet a grid admin instance::\n\n    from threedigrid.admin.gridadmin import GridH5Admin\n\n    f = 'gridadmin.h5'\n    ga = GridH5Admin(f)\n\n\nThe grid admin directly holds some model specific attributes like whether the model has a 1D or 2D\nor groundwater section::\n\n    In [4]: ga.has_groundwater\n    Out[4]: False\n\n    In [5]: ga.has_1d\n    Out[5]: True\n\n\n\nThere are different types of filters but a filter, generally speaking, acts on field. That means you can\nfilter by value. If you have a line model instance you can filter the data by the kcu field::\n\n    ga.lines.filter(kcu__in=[100,102])\n\nor by the lik value::\n\n    ga.lines.filter(lik__eq=4)\n\nThe filtering is lazy, that is, to retrieve data you have to call data explicitly::\n\n    ga.lines.filter(lik__eq=4).data  # will return an ordered dict\n\n\nThe structure control actions netcdf can also be analyzed and exported using threedigrid::\n\n    from threedigrid.admin.gridresultadmin import GridH5StructureControl\n    from threedigrid.admin.structure_controls.exporters import structure_control_actions_to_csv\n\n    gst = GridH5StructureControl(\"gridadmin.h5\", \"structure_control_actions_3di.nc\")\n    gst.table_control\n    structure_control_actions_to_csv(gst, \"test.csv\")\n\nRemote procedure calls\n----------------------\n\nCurrently only the client-side is included. The server-side might be added in a later stage.\nNote: this is an advanced feature used inside the 3Di stack, probably you don't need this.\nNote2: you need Python 3.7 or higher for this to work.\n\n\nInstallation::\n\n    $ pip install threedigrid[rpc]\n\n\nBasic usage::\n\n    ga = GridH5ResultAdmin('rpc://REDIS_HOST/SIMULATION_ID', 'rpc://REDIS_HOST/SIMULATION_ID')\n    # Replace REDIS_HOST and SIMULATION_ID with actual values.\n    future_result = ga.nodes.filter(lik__eq=4).data\n    data = await future_result.resolve()\n\nSubscription usage::\n\n    subscription = await future_result.subscribe()\n\n    async for item in subscription.enumerate():\n          # do something with item\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\nHistory\n=======\n\n2.3.3 (2024-11-26)\n------------------\n\n- Reverted string-casting of file paths in GridH5ResultAdmin constructor.\n\n\n2.3.2 (2024-11-26)\n------------------\n\n- Added get_source_type() to GridH5StructureControl.\n\n\n2.3.1 (2024-10-21)\n------------------\n\n- Add customized water quality results NetCDF interface.\n\n- Extract area name from customized NetCDF files.\n\n- Fix slicing of Id fields in customized NetCDF files.\n\n\n2.3.0 (2024-08-07)\n------------------\n\n- Add customized results NetCDF interface.\n\n\n2.2.11 (2024-07-25)\n-------------------\n\n- Fix NumPy 2.0 incompatibilities.\n\n\n2.2.10 (2024-05-29)\n-------------------\n\n- Move _field_model_dict and its methods back to GridH5ResultAdmin.\n- Add `substances` and overwrite `get_model_instance_by_field_name` method\n  in GridH5WaterQualityResultAdmin.\n\n\n2.2.9 (2024-05-27)\n------------------\n\n- Move _field_model_dict and its methods from GridH5ResultAdmin to GridH5Admin.\n\n\n2.2.8 (2024-04-25)\n------------------\n\n- Add `group_by_grid_id` to structure control interface.\n\n\n2.2.7 (2024-04-22)\n------------------\n\n- Set substance units on Nodes.\n\n- Set exchange level on levl attribute on breach geojson export.\n\n- Removed old gridadmin file from tests.\n\n- Set pumps on start node and add line geometry in geojson export.\n\n- Return YZ tabulated data in geojson export if YZ profile.\n\n\n2.2.6 (2024-03-13)\n------------------\n\n- Add cross section type and tabulated data to geojson export for:\n  channels, pipes, weirs, culverts, and orifices\n\n\n2.2.5 (2024-03-07)\n------------------\n\n- Removed sphinx_rtd_theme from code dependencies. (#221)\n\n\n2.2.4 (2024-02-06)\n------------------\n\n- Substance count regex fix\n\n- Set substance name on Nodes\n\n\n2.2.3 (2024-01-12)\n------------------\n\n- Fix 1D/2D data swap for water quality results\n\n\n2.2.3b (2024-01-02)\n-------------------\n\n- Added build/release Github action.\n\n\n2.2.2 (2023-12-21)\n------------------\n\n- Bugfix: **only** in case of **boundaries**: correct sorting of timeseries in all `TimeSeriesSubsetArrayField`. This\n  affected: Nodes [infiltration_rate_simple, ucx, ucy, leak, intercepted_volume, q_sss]\n  Lines: [qp, up1, breach_depth, breach_width]\n\n- Note: The `depth` and `width` field are broken for `breaches` object. \n  Please use `breach_depth` and `breach_width` on the `lines` object instead.\n\n\n2.2.1 (2023-12-05)\n------------------\n\n- Fix Lines lookup index bug for single cell models\n\n\n2.2.0 (2023-11-07)\n------------------\n\n- Add water quality results NetCDF interface.\n\n- Drop Python 3.7 support\n\n\n2.1.2 (2023-11-03)\n------------------\n\n- Retry PyPi release.\n\n\n2.1.1 (2023-11-03)\n------------------\n\n- Add missing init file to structure control folder\n\n\n2.1.0 (2023-10-16)\n------------------\n\n- Added structure control actions NetCDF interface and CSV exporter.\n\n\n2.0.6 (2023-07-07)\n------------------\n\n- Added `sewerage` and `sewerage_type` fields to Line model.\n\n\n2.0.5 (2023-03-27)\n------------------\n\n- Switch to using 'line_geometries' for Breaches model.\n\n\n2.0.4 (2023-03-24)\n------------------\n\n- Make 'line_coords' the geometry on breaches geojson output.\n\n\n2.0.3 (2023-03-22)\n------------------\n\n- Bugfix: Dataset instance check is not generic.\n\n\n2.0.2 (2023-03-21)\n------------------\n\n- Added 'line_coords' to Breaches model and default export fields.\n\n\n2.0.1 (2023-02-22)\n------------------\n\n- Added `meta` table to Geokpackage export with meta information about 3Di model.\n\n- Added 2D groundwater boundary line types 600, 700, 800, 900. \n  Eextended the '2D_GROUNDWATER' subset.\n\n\n2.0.0 (2023-01-11)\n------------------\n\n- Removed gridadmin.lines.breaches.\n\n- Removed MappedSubsetArrayField.\n\n- Added 'code' and 'display_name' to breaches.\n\n- Added missing Geopackage fields `bottom_level` and `drain_level` for nodes. Renamed `connection_node_storage_are` to `connection_node_storage_area`.\n\n- Dropped python 3.6 support.\n\n- Fixed compatibility with shapely 2.*.\n\n\n1.2.5 (2022-10-17)\n------------------\n\n- Optimized geojson export memory usage.\n\n- Removed majority of properties from the flowlines (1D2D) export.\n\n\n1.2.4 (2022-10-03)\n------------------\n\n- Allow exporting flowlines (1D2D) to geojson or shapefile.\n\n\n1.2.3 (2022-06-01)\n------------------\n\n- Divers Geopackage exports improvements.\n\n\n1.2.2 (2022-05-31)\n------------------\n\n- New release since 1.2.1 was already present at PyPi.\n\n\n1.2.1 (2022-05-31)\n------------------\n\n- Added new OGR based exporter for Geopackage exports.\n  Currently only has default export settings for lines, cells, nodes and pumps.\n\n- Fixed error in crs attribute.\n\n- Removed deprecation warning on gridadmin.breaches and added it to\n  gridadmin.lines.breaches.\n\n- Fixed export_breaches for new gridadmins.\n\n\n1.2.0 (2022-03-09)\n------------------\n\n- Added discharge_coefficient_positive and discharge_coefficient_negative\n  to breaches.\n\n- Removed threedicore version check on GridH5ResultAdmin initialization.\n\n- Added crs attribute to GridH5Admin. Pyproj >=2.2 is required.\n\n- Drop python 2.7 support.\n\n\n1.1.14 (2022-02-16)\n-------------------\n\n- Fix geometry selection filtering, gridadmin can now contain nan values.\n\n- Added dimp attribute to nodes.\n\n\n1.1.13 (2021-12-09)\n-------------------\n\n- Added flod and flou attributes to lines for possible reading obstacle heights.\n\n\n1.1.12 (2021-11-18)\n-------------------\n\n- Added 'has_dem_averaged' attribute to cells.\n\n\n1.1.11 (2021-11-02)\n-------------------\n\n- Exporters now export NaN and -9999.0 float values as NULL.\n\n- Fixed exporting string dtype fields (e.g. cont_type) in OGR exporter. For instance,\n  the string \"b'something'\" now is written as \"something\".\n\n- Skip the dummy element (with id=0) in all exporters.\n\n- Set the FID (feature ID) in the OGR (shapefile/geopackage/some geojson) exporters.\n\n- Deprecate specific serializers.py under threedigrid.admin.breaches, .lines, .nodes and\n  .pumps.\n\n\n1.1.10 (2021-11-01)\n-------------------\n\n- Fix GeoJSON levees coordinate order.\n\n\n1.1.9 (2021-10-25)\n------------------\n\n- Renamed the 's_1d' field under lines to 'ds1d_half'.\n\n- Added 'initial_waterlevel' to nodes.\n\n\n1.1.8 (2021-10-25)\n------------------\n\n- Added 'nodes_embedded', available under gridadmin Class.\n\n\n1.1.7 (2021-10-18)\n------------------\n\n- Fixed timeseries filtering with h5py>=3.1.x\n\n\n1.1.6 (2021-08-31)\n------------------\n\n- Added CrossSection model to ORM.\n- Added following fields to lines: `dpumax cross1 cross2 ds1d s1d cross_weight invert_level_start_point invert_level_end_point`\n- Added following fields to nodes: `calculation_type drain_level storage_area dmax`\n- Created new subset 1D for Nodes.\n\n\n1.1.5 (2021-08-10)\n------------------\n\n- Release on pypi (repo has no Github actions)\n\n\n1.1.4 (2021-08-10)\n------------------\n\n- Replace nan with null in geojson output.\n\n- Remove requirements files, only keep one for development in docker.\n\n\n1.1.3 (2021-06-01)\n------------------\n\n- Bugfix: geojson levees export also crashed\n  due to 3.8.10 and numpy 1.19.1\n\n\n1.1.2 (2021-05-28)\n------------------\n\n- Fixed only filter for aggregate result admin. (#121)\n\n- Added cross_pix_coords field to lines.\n\n- Bugfix: geojson line_geometries export crashes with\n  Python 3.8.10 and numpy 1.19.1. Needed explicit astype conversion\n\n\n1.1.1 (2021-03-30)\n------------------\n\n- Reduced the source distribution filesize by removing the tests.\n\n\n1.1.0 (2021-03-29)\n------------------\n\n- Bumped asyncio-rpc to 0.1.10\n\n- Fixed GeoJSON export with pyproj <= 1.9.6.\n\n- Fixed compatibility with h5py 3.*.\n\n- Added gridadmin.grid.transform.\n\n- Fixed gridadmin.grid.n2dtot and .dx propagation.\n\n- Added gridadmin.cells.iter_by_tile() and .get_extent_pixels().\n\n\n1.0.27 (2021-02-22)\n-------------------\n\n- Bumped asyncio-rpc to 0.1.9\n\n\n1.0.26 (2021-02-05)\n-------------------\n\n- Fixed rpc gridadmin properties\n\n\n1.0.25 (2020-09-15)\n-------------------\n\n- Bugfix: crest_level is also inverted by Inpy. Use\n  the raw value in the prepare step to include the\n  correct (non inverted) value.\n\n\n1.0.24 (2020-09-02)\n-------------------\n\n- Removed numba as dependency, since it did not really give any\n  performance gain on Linux.\n\n\n1.0.23 (2020-09-02)\n-------------------\n\n- Creating fresh release after upload failed.\n\n\n1.0.22 (2020-09-02)\n-------------------\n\n- Added extra field 'discharge_coefficient' to channels and pipes. These\n  fields default to 1.0.\n\n- Bugfix: don't use the z-coordinate when making line_geometries during the prepare step\n\n\n1.0.21 (2020-07-17)\n-------------------\n\n- Invert_level_start_point and end point where inverted\n  by Inpy. After this change the values will be correct again,\n  however present gridadmin files will still have the incorrect value.\n\n- Added `Breaches` model under lines with specific breach fields\n  mapped from the 'breaches' h5py datagroup.\n\n- Added `MappedSubsetArrayField` allowing to map arrays from other\n  h5py datagroups to a model on another datagroup subset. Breaches\n  uses this to map the array's under 'breaches' to 'lines'\n\n\n1.0.20.12 (2020-07-14)\n----------------------\n\n- Fixed problem with previous release\n\n\n1.0.20.11 (2020-07-14)\n----------------------\n\n- Nodgrid generation bugfixes\n\n\n1.0.20.10 (2020-07-07)\n----------------------\n\n- Added missing numba requirement in setup.py\n\n\n1.0.20.9 (2020-07-07)\n---------------------\n\n- Fixed RPC breaches/pumps bug\n\n- Added fast nod_grid generation on cells\n\n\n1.0.20.8 (2020-05-22)\n---------------------\n\n- Add groundwater_cells to exporter for frontend.\n\n\n1.0.20.7 (2020-05-18)\n---------------------\n\n- Added `content_pk` to the export_constants of all structures which have a\n  `content_pk`.\n\n\n1.0.20.6 (2020-04-15)\n---------------------\n\n- An empy array [] is returned now instead of None if there is no\n  dataset.\n\n- Line geojson items need to use line_geometry values\n\n- Bugfix for `Model._get_subset_idx` not instantiating new subsets with their parent's\n  mixins.\n\n\n1.0.20.5 (2020-04-01)\n---------------------\n\n- Use 'ga.xxx.id.size' to check if certain submodels (like channels/weirs/manholes)\n  are available for geojson exports.\n\n\n1.0.20.4 (2020-03-31)\n---------------------\n\n- Allow older pyrpoj versions. (pre 2.2.0)\n\n- Bugfix for timeseries start_time=0 selection and allow indexes=slice(x,x,x)\n  in combination with sample() method.\n\n- Added try-except surrounding all imports of the package `geojson`. This package is\n  only available when threedigrid is installed with the extra [geo] extension.\n\n- Add `ORIFICES_EXPORT_FIELDS` to export_constants.\n\n\n1.0.20.3 (2020-03-18)\n---------------------\n\n- Add extra field `pixel_width` to cells\n\n- Bugfix for GeometryIntersectionFilter: filter was only checking on\n  intersecting bounding boxes\n\n\n1.0.20.2 (2020-03-06)\n---------------------\n\n- The `sample` method needs to skip the last timestamp for SWMR\n  to work correctly. (time dataset can have one item more\n  than datasets with timeseries)\n\n1.0.20.1 (2020-02-26)\n---------------------\n\n- Bugfix: reprojection with no coordinates (empty array's)\n\n\n1.0.20 (2020-02-19)\n-------------------\n\n- Added `GeometryIntersectionFilter`.\n\n- Added general GeoJsonSerializer which allows you to specify the field names\n  you want to serialize and extract to geojson. The GeoJsonSerializer allows\n  you to specify nested fields.\n\n- Added a set of standard export fields for each model.\n\n- Automatically pick the correct serializer based on file extention\n\n    - .json/.geojson --> to_geojson\n    - .gpgk --> to_geopackage\n    - .shp --> to_shape\n\n1.0.19.1 (2020-02-04)\n---------------------\n\n- Minor bugfix, need to check if h5py filepath is a str or bytes string\n  during initialization\n\n\n1.0.19 (2020-01-31)\n-------------------\n\n- First release with RPC integration.\n\n\n1.0.19rc3 (2020-01-14)\n----------------------\n\n- Bumped version of asyncio-rpc\n\n\n1.0.19rc2 (2020-01-14)\n----------------------\n\n- Fixed incorrect version number\n\n\n1.0.19rc1 (2020-01-14)\n----------------------\n\n- Added RPC datasource which enables to use the majority of\n  threedigrid in a RPC setting. Uses asyncio-rpc for\n  sending/handling RPC calls.\n\n- RPC datasource allows both one time executing (`resolve()`) and pub/sub\n  (`subscribe()`) functionialty.\n\n- Refactored to allow using RPC datasource\n\n1.0.18 (2019-11-28)\n-------------------\n\n- Only use pyproj Transformer if it is present\n  else revert to old transform method\n\n\n1.0.17 (2019-11-28)\n-------------------\n\n- Added `content_pk` to the pumps model.\n\n- Bumped package versions\n\n- Reduced reprojection overhead of line_geometries.\n\n\n1.0.16 (2019-07-08)\n-------------------\n\n- Removed max capacity from Orifice model/serializer.\n\n\n1.0.15 (2019-07-05)\n-------------------\n\n- Fixed group update for default null values.\n\n\n1.0.14 (2019-06-19)\n-------------------\n\n- Do not use ``0`` has a default when converting database objects to numpy\n  arrays in the prepare phase.\n\n\n1.0.13 (2019-05-01)\n-------------------\n\n- Fixed `_field_model_dict` being a class variable.\n\n\n1.0.12 (2019-04-18)\n-------------------\n\n- Added sumax to nodes\n\n\n1.0.11 (2019-02-01)\n-------------------\n\n- Bug fix in `h5py_file` method mapping.\n\n\n1.0.10 (2019-01-31)\n-------------------\n\n- Added sources and sinks (q_sss) to threedigrid.\n\n\n1.0.9 (2019-01-31)\n------------------\n\n- Manholes preparation fixed mapping in ``connection_node_pk``.\n\n- Added `to_structured_array` method for retrieving (filtered) results\n  as Numpy structured array instead of an OrderedDict\n\n\n1.0.8 (2019-01-03)\n------------------\n\n- Set fixed type to the fields `code`, `display_name` and `shape`. These fields\n  now have a fixed lenght of 32, 64 and 4 characters respectively.\n\n\n1.0.7 (2018-11-21)\n------------------\n\n- Bug fix: dict.values() and dict.keys() in python 3 are causing some\n  unintended behaviour.\n\n\n1.0.6 (2018-11-14)\n------------------\n\n- New release due to failing uploads.\n\n\n1.0.5 (2018-11-14)\n------------------\n\n- Add aggregation option 'current' to volume and intercepted_volume.\n\n- Using a non-tuple sequence for multidimensional indexing is deprecated; use\n  `arr[tuple(seq)]` instead of `arr[seq]`.\n\n- Properties should be strings so we can use string methods on them.\n\n- Do not prepare levees if there aren't any.\n\n- Split requirements file to allow for finer grained builds (for instance to\n  generate the documentation).\n\n- Add 'intercepted_volume' to NodesAggregateResultsMixin.\n\n- Split requirements file to allow for finer grained builds (for instance to\n  generate the documentation).\n\n\n1.0.4 (2018-10-17)\n------------------\n\n- Added BooleanArrayField for boolean values and use it for `is_manhole` filter.\n  NO_DATA_VALUE is interpreted as False.\n\n\n1.0.3 (2018-09-17)\n------------------\n\n- Do not throw exception on cftime ``ImportError``\n\n\n1.0.2 (2018-09-17)\n------------------\n\n- Add boolean filter for manholes.\n\n\n1.0.1 (2018-09-11)\n------------------\n\n- Patch for converting numpy strings/bytes to float for both python2/3.\n\n- Dropped NetCDF library and replaced opening NetCDF files with h5py\n\n- Bumped h5py to 2.8.0\n\n\n1.0 (2018-09-04)\n----------------\n\n- Made threedigrid >= Python 3.5 compatible.\n\n\n0.2.8 (2018-07-23)\n------------------\n\n- Bug fix for issue #44: use the method ``get_filtered_field_value()`` instead\n  of ``get_field_value()`` for the count property.\n\n- Properly closes netcdf-file in ``GridH5ResultAdmin``.\n\n\n0.2.7 (2018-05-24)\n------------------\n\n- Add export functions for 2D to the ``export_all()`` collection.\n\n\n0.2.6 (2018-05-17)\n------------------\n\n- Do not use ``pkg_resources`` to determine the current version but use\n  zest_releaser to update the version string in threedigrid/init.py\n\n\n0.2.5 (2018-05-16)\n------------------\n\n- Use the custom ``NumpyEncoder`` to convert specific numpy types to native\n  python types when calling ``(geo-)json.dumps()``.\n\n\n0.2.4 (2018-05-15)\n------------------\n\n- Introducing subset fields that can be used to query results that are collected\n  only for subsets of the model, like the 2D section.\n\n\n0.2.3 (2018-05-14)\n------------------\n\n- Fix lookup_index functionality for composite fields.\n\n- Make model name property optional. That is, 'unknown' will be returned if the\n  name cannot be derived.\n\n- Changed Depth/width fields on breach-timeseries to breach_depth and breach_width.\n\n0.2.2 (2018-04-30)\n------------------\n\n- ``_get_composite_meta()`` does not raise an AssertionError anymore if\n  composite field attributes differ. Instead a warning is issued.\n\n\n0.2.1 (2018-04-26)\n------------------\n\n- Bug fix: ``threedicore_result_version`` must be a property.\n\n\n0.2 (2018-04-26)\n----------------\n\n- Added additional exporters for\n\n    - 2D_GROUNDWATER\n    - 2D_OPEN_WATER\n    - 2D_VERTICAL_INFILTRATION\n\n- Added method ``get_model_instance_by_field_name``  to the\n  ``GridH5ResultAdmin`` class. This makes it possible to do reverse lookups\n  in situations where you have a field name but do not know which model it\n  belongs to. N.B the field must be unique otherwise an ``IndexError`` will\n  be raised.\n\n- Added property ``dt_timestamps`` to the timeseries_mixin module.\n\n- The version number is added to the ``__init__`` file dynamically using the\n  ``pkg_resources`` API.\n\n- Timestamps of all timeseries fields are shown for aggregation results.\n\n- Timestamps in the aggregation results are filtered when retrieving subsets of timeseries.\n\n- Introducing the ModelMeta class. Its main purpose at this moment is to compute all\n  possible combinations of composite_fields and aggregation variables.\n\n- Fixed return statement of method slice (in class Model) which now takes\n  ``**new_class_kwargs``.\n\n- Empty or missing datasets are now displayed as ``np.array(None)`` instead of\n  raising an error.\n\n0.1.6 (2018-04-18)\n------------------\n\n- New release using twine 1.11.\n\n\n0.1.5 (2018-04-18)\n------------------\n\n- Added support for composite fields which can be used to fetch data from\n  multiple source variables as a single field. Like this\n  result_3di netcdfs can be queried the same way as gridadmin files.\n\n0.1.4 (2018-04-08)\n------------------\n\n- Changed ResultMixin to dynamically add attributes based on the netcdf\n  variables.\n\n- Added basic result proccesing for line/node data.\n\n- The filter mask is computed only for array's affected and\n  before applying it to all array's\n\n- The 'only' filter works much faster because the filter mask\n  is only applied on fields that are affected.\n\n- The filter mask is cached on the line/node instance after getting\n  the first value. You can thus do something like:\n\n      queryset = gridadmin.lines.filter(kcu=2)\n      ids = queryset.id\n      line_coords = queryset.line_coords\n\n  and the filter mask will only be computed once.\n\n- Add click console scripts ``3digrid_explore`` and ``3digrid_export`` for\n  quick overviews and data exports.\n\n- Make ogr/gdal imports optional to avoid breaking parts of the documentation.\n\n- Added documentation and setup for ``sphinx`` documentation pipeline.\n\n- Use linear referencing for embedded channels to keep the original geometry\n  intact when preparing line geometries for visualisation.\n\n- Define extra's to make the standard threedigrid distribution as\n  lightweight as possible.\n\n- Convert strings in ``attrs`` to ``numpy.string_`` to fix crashes under\n  Windows.\n\n0.1.3 (2018-03-16)\n------------------\n\n- Remove property ``has_groundwater`` from ``GridH5Admin``.\n  Should always be provided by the threedicore itself. Gives a warning for\n  backwards compatibility.\n\n\n0.1.2 (2018-03-12)\n------------------\n\n- Get model extent now always returns a bbox (minX, minY, maxX, maxY)\n\n0.1.1 (2018-03-06)\n------------------\n\n- All imports are absolute.\n\n- Added install info using pip.\n\n\n0.1.0 (2018-03-05)\n------------------\n\n* First release with fullrelease.\n",
    "bugtrack_url": null,
    "license": "BSD license",
    "summary": "Python package for the threedigrid administration",
    "version": "2.3.3",
    "project_urls": {
        "Homepage": "https://github.com/nens/threedigrid"
    },
    "split_keywords": [
        "threedigrid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98ea1154f19785c18d35066ce8819ba50aedec91e4194d712d84e14930e7b073",
                "md5": "b109e1790527010d105c5a12c50a856f",
                "sha256": "46e37fa8e15c84d5757827ed8a306d90b611599d2c673e73e3ae6212906e23cd"
            },
            "downloads": -1,
            "filename": "threedigrid-2.3.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b109e1790527010d105c5a12c50a856f",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 112133,
            "upload_time": "2024-11-26T14:59:10",
            "upload_time_iso_8601": "2024-11-26T14:59:10.996168Z",
            "url": "https://files.pythonhosted.org/packages/98/ea/1154f19785c18d35066ce8819ba50aedec91e4194d712d84e14930e7b073/threedigrid-2.3.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bae03512a674061205017682838ac47a6083d57e8faa5a6f2b7541bd1298b9c2",
                "md5": "107466400c9fdeef8e1dc4fc92a5ca80",
                "sha256": "65095b0d5e33213e24c5773356dc03f754d6835ed406398b3a5a58fd77eb7e78"
            },
            "downloads": -1,
            "filename": "threedigrid-2.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "107466400c9fdeef8e1dc4fc92a5ca80",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 127301,
            "upload_time": "2024-11-26T14:59:13",
            "upload_time_iso_8601": "2024-11-26T14:59:13.176722Z",
            "url": "https://files.pythonhosted.org/packages/ba/e0/3512a674061205017682838ac47a6083d57e8faa5a6f2b7541bd1298b9c2/threedigrid-2.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 14:59:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nens",
    "github_project": "threedigrid",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "threedigrid"
}
        
Elapsed time: 0.50199s