Releases: hyriver/pynhd
Releases · hyriver/pynhd
v0.19.4
Release Notes
New Features
- Add the development version of the NLDI web service to the
NLDIclass. This version is not stable and is intended for testing purposes only. The default version is still the production version.
Bug Fixes
- Fix the issue with normalizing variables in
streamcatfunctionc caused by changes in the StreamCat web service.
v0.19.3
Release Notes
Internal Changes
- Use
orjsoninstead ofujsondue to the package not being maintained anymore. The developer ofujsonraised conrcerns about security vulnerabilities and recommended usingorjsoninstead. - Create two new modules called
nldiandpygeoapifor better organization of the codebase.
v0.19.0
Release Notes
Breaking Changes
- Remove
NLDI.getcharacteristic_byidmethod since its endpoint will be removed from the NLDI service. The characteristics can still be accessed via theNLDI.get_characteristicsmethod and only requires specifying the characteristic names and optionally the NHDPlus ComIDs. This method calls thepynhd.nhdplus_attrs_s3function internally. - Switch to using the new StreamCat web service link. While the public API of the
pynhd.streamcatfunction 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_s3to pass a PyArrow Expression for filtering the query.
Internal Changes
- Switch to using the new NLDI web service link. Note that NLDI web service now has a rate limit of 3600 requests per hour per IP.
v0.18.0
Release Notes
New Features
- Replace the links to NLDI and PyGeoAPI web services to their new URLs.
- Add two new methods to
GeoConnexclass for queryingbyboxandbyfilter. Note that CQL query is still not working due to an issue with the GeoConnex service. For now, it's recommended to use thebyfiltermethod for most of the queries, including spatial queries. For simple spatial queries, you can use thebyboxmethod 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
exceptionsmodule. This is to declutter the public API and make it easier to maintain.
v0.17.1
Release Notes
Internal Changes
- Drop support for Python 3.8 since its end-of-life date is October 2024.
v0.17.0
Release Notes
New Features
- The function
pynhd.streamcatnow can be called without any arguments to get a dataframe of all available metrics and their descriptions.
Internal Changes
- Add the
exceptionsmodule 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
srclayout instead of theflatlayout 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.
v0.16.3
Release Notes
New Features
- Add support for LakeCat dataset in
streamcatfunction. A new argument calledlakes_onlyis added to the function. If set toTrue, only metrics for lake and their associated catchments will be returned. The default isFalseto retain backward compatibility.
Bug Fixes
- Modify
HP3Dclass based on the latest changes to the 3D Hydrography Program service. Hydrolocation layer has now three sub-layers:hydrolocation_waterbodyfor Sink, Spring, Waterbody Outlet,hydrolocation_flowlinefor Headwater, Terminus, Divergence, Confluence, Catchment Outlet,hydrolocation_reachfor 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_catchmentsfunction no longer accepts "streamcat" as an input for thefeatureargument. For all StreamCat queries, use thestreamcatfunction instead. Now, theepa_nhd_catchmentsfunction is essentially useful for getting Curve Number data.
v0.16.2
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_l48function, when the layer isNHDFlowline_NetworkorNHDFlowline_NonNetwork, merge allMultiLineStringgeometries toLineString.
v0.16.1
Release Notes
Bug Fixes
- Fix an issue in
network_xsectionandflowline_xsectionrelated to the changes inshapely2 API. Now, these functions should return the correct cross-sections.
v0.16.0
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 Ashapely.LineString. You can usepygeoapifunction withservice="elevation_profile"(orPyGeoAPIclass) to access this new endpoint. Previously, theelevation_profileendpoint was used for getting elevation profile along a path from two endpoints and the inputGeoDataFramemust have been aMultiPointwith two coordinates. Now, you must the input must containLineStringgeometries. - Switch to using the new smoothing algorithm from
pygeoutilsfor resampling the flowlines and getting their cross-sections. This new algorithm is more robust, accurate, and faster. It has a new argument calledsmoothingfor controlling the number knots of the spline. Higher values result in smoother curves. The default value isNonewhich uses all the points from the input flowline.