Skip to content

Releases: hyriver/pynhd

v0.16.3

26 Apr 15:26
Compare
Choose a tag to compare

Release Notes

New Features

  • Add support for LakeCat dataset in streamcat function. A new argument called lakes_only is added to the function. If set to True, only metrics for lake and their associated catchments will be returned. The default is False to retain backward compatibility.

Bug Fixes

  • Modify HP3D class based on the latest changes to the 3D Hydrography Program service. Hydrolocation layer has now three sub-layers:
    • hydrolocation_waterbody for Sink, Spring, Waterbody Outlet,
    • hydrolocation_flowline for Headwater, Terminus, Divergence, Confluence, Catchment Outlet,
    • hydrolocation_reach for Reach Code, External Connection.

Breaking Changes

  • EPA's HMS no longer supports the StreamCat dataset, since they have a dedicated service for it. Thus, the epa_nhd_catchments function no longer accepts "streamcat" as an input for the feature argument. For all StreamCat queries, use the streamcat function instead. Now, the epa_nhd_catchments function is essentially useful for getting Curve Number data.

v0.16.2

12 Feb 16:39
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • In NLDI.get_basins, the indices used to be station IDs but in the previous release they were reset by mistake. This version retains the correct indices.

New Features

  • In nhdplus_l48 function, when the layer is NHDFlowline_Network or NHDFlowline_NonNetwork, merge all MultiLineString geometries to LineString.

v0.16.1

04 Jan 02:32
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Fix an issue in network_xsection and flowline_xsection related to the changes in shapely 2 API. Now, these functions should return the correct cross-sections.

v0.16.0

03 Jan 22:05
Compare
Choose a tag to compare

Release Notes

New Features

  • Add access to USGS 3D Hydrography Program (3DHP) service. The new class is called HP3D. It can be queried by IDs, geometry, or SQL where clause.
  • Add support for the new PyGeoAPI endpoints called xsatpathpts. This new endpoint is useful for getting elevation profile along A shapely.LineString. You can use pygeoapi function with service="elevation_profile" (or PyGeoAPI class) to access this new endpoint. Previously, the elevation_profile endpoint was used for getting elevation profile along a path from two endpoints and the input GeoDataFrame must have been a MultiPoint with two coordinates. Now, you must the input must contain LineString geometries.
  • Switch to using the new smoothing algorithm from pygeoutils for resampling the flowlines and getting their cross-sections. This new algorithm is more robust, accurate, and faster. It has a new argument called smoothing for controlling the number knots of the spline. Higher values result in smoother curves. The default value is None which uses all the points from the input flowline.

v0.15.2

22 Sep 14:25
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Update GeoConnex based on the latest changes in the web service.

v0.15.1

02 Sep 16:55
Compare
Choose a tag to compare

Release Notes

Bug Fixes

  • Fix HyRiver libraries requirements by specifying a range instead of exact version so conda-forge can resolve the dependencies.

v0.15.0

07 May 22:37
Compare
Choose a tag to compare

Release Notes

From release 0.15 onward, all minor versions of HyRiver packages will be pinned. This ensures that previous minor versions of HyRiver packages cannot be installed with later minor releases. For example, if you have py3dep==0.14.x installed, you cannot install pydaymet==0.15.x. This is to ensure that the API is consistent across all minor versions.

New Features

  • Add a new function, called nhdplus_h12pp, for retrieving HUC12 pour points across CONUS.
  • Add use_arrow=True to pynhd.nhdplus_l48 when reading the NHDPlus dataset. This speeds up the process since pyarrow is installed.
  • In nhdplus_l48 make layer option so sql parameter of pyogrio.read_dataframe can also be used. This is necessary since pyogrio.read_dataframe does not support passing both layer and sql parameters.
  • Update the mainstems dataset link to version 2.0 in mainstem_huc12_nx.
  • Expose NHDTools class to the public API.
  • For now, retain compatibility with shapely<2 while supporting shapley>=2.

Bug Fixes

  • Remove unnecessary conversion of id_col and toid_col to Int64 in nhdflw2nx and vector_accumulation. This ensures that the input data types are preserved.
  • Fix an issue in nhdplus_l48, where if the input data_dir is not absolute py7zr fails to extract the file.

v0.14.0

05 Mar 16:50
Compare
Choose a tag to compare

Release Notes

New Features

  • Rewrite the GeoConnex class to provide access to new capabilities of the web service. Support for spatial queries have been added via CQL queries. For more information, check out the updated GeoConnex example notebook.
  • Add a new property to StreamCat, called metrics_df that gets a dataframe of metric names and their description.
  • Create a new private StreamCatValidator class to avoid polluting the public StreamCat class with private attributes and methods. Moreover, add a new alternative metric names attribute to StreamCat called alt_names for handling those metric names that do not follow METRIC+YYYY convention. This attribute is a dictionary that maps the alternative names to the actual metric names, so users can use METRIC_NAME column of metrics_df and add a year suffix from valid_years attribute of StreamCat to get the actual metric name.
  • In navigate_by* functions of NLDI add stop_comid, which is another criterion for stopping the navigation in addition to distance.
  • Improve UserWarning messages of NLDI and WaterData.

Breaking Changes

  • Remove pynhd.geoconnex function since more functionality has been added to the GeoConnex service that existence of this function does not make sense anymore. All queries should be done via pynhd.GeoConnex class.
  • Rewrite NLDI to improve code readability and significantly improving performance. Now, its methods do now return tuples if there are failed requests, instead they will be shown as a UserWarning.
  • Bump the minimum required version of shapely to 2.0, and use its new API.

Internal Changes

  • Sync all minor versions of HyRiver packages to 0.14.0.

v0.13.12

10 Feb 16:19
Compare
Choose a tag to compare

Release Notes

New Features

  • Update the link to version 2.0 of the ENHD dataset in enhd_attrs.

Internal Changes

  • Improve columns data types in enhd_attrs and nhdplus_vaa by using int32 instead of Int64, where applicable.
  • Sync all patch versions of HyRiver packages to x.x.12.

v0.13.11

24 Jan 22:24
Compare
Choose a tag to compare

Release Notes

New Features

  • The prepare_nhdplus now supports NHDPlus HR in addition to NHDPlus MR. It automatically detects the NHDPlus version based on the ID column name: nhdplusid for HR and comid for MR.

Internal Changes

  • Fully migrate setup.cfg and setup.py to pyproject.toml.
  • Convert relative imports to absolute with absolufy-imports.
  • Improve performance of prepare_nhdplus by using pandas.merge instead of applying a function to each row of the dataframe.