Pynhd

Latest version: v0.19.0

Safety actively analyzes 701533 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

0.19.0

-------------------

Breaking Changes
~~~~~~~~~~~~~~~~
- Remove ``NLDI.getcharacteristic_byid`` method since its endpoint will be
removed from the NLDI service. The characteristics can still be accessed
via the ``NLDI.get_characteristics`` method and only requires specifying
the characteristic names and optionally the NHDPlus ComIDs. This method
calls the ``pynhd.nhdplus_attrs_s3`` function internally.
- Switch to using the new StreamCat web service
`link <https://api.epa.gov/StreamCat>`__. While the public API of the
``pynhd.streamcat`` function did not change the web service itself might
return different results and metrics names have been changed. Thus, this
change might affect the results of the function and is considered a breaking
change.

New Features
~~~~~~~~~~~~
- Add a new optional argument to ``pynhd.nhdplus_attrs_s3`` to pass a PyArrow
Expression for filtering the query.

Internal Changes
~~~~~~~~~~~~~~~~
- Switch to using the new NLDI web service `link <https://api.water.usgs.gov/nldi>`__.
Note that NLDI web service now has a rate limit of 3600 requests per hour per IP.

0.18.1

-------------------

Bug Fixes
~~~~~~~~~
- In ``GeoConnex``, set the ``request_type='POST'`` for all CQL queries. While
non-spatial CQL queries are working, spatial CQL queries are still not working
due to an issue with the GeoConnex service. For now, it's recommended to use
the ``byfilter`` method for most of the queries, including spatial queries.
For simple spatial queries, you can use the ``bybox`` method then filter the
results based on the actual geometry.

0.18.0

-------------------

New Features
~~~~~~~~~~~~
- Replace the links to NLDI and PyGeoAPI web services to their new URLs.
- Add two new methods to ``GeoConnex`` class for querying ``bybox`` and
``byfilter``. Note that CQL query is still not working due to an issue
with the GeoConnex service. For now, it's recommended to use the ``byfilter``
method for most of the queries, including spatial queries. For simple spatial
queries, you can use the ``bybox`` method then filter the results based on
the actual geometry.

Breaking Changes
~~~~~~~~~~~~~~~~
- Drop support for Python 3.8 since its end-of-life date is October 2024.
- Remove all exceptions from the main module and raise them from the
``exceptions`` module. This is to declutter the public API and make
it easier to maintain.

0.17.0

-------------------

New Features
~~~~~~~~~~~~
- The function ``pynhd.streamcat`` now can be called without any arguments
to get a dataframe of all available metrics and their descriptions.

Internal Changes
~~~~~~~~~~~~~~~~
- Add the ``exceptions`` module to the high-level API to declutter
the main module. In the future, all exceptions will be raised from
this module and not from the main module. For now, the exceptions
are raised from both modules for backward compatibility.
- Switch to using the ``src`` layout instead of the ``flat`` layout
for the package structure. This is to make the package more
maintainable and to avoid any potential conflicts with other
packages.
- Add artifact attestations to the release workflow.

0.16.3

-------------------

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.

0.16.2

-------------------

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``.

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.