Releases: hyriver/pynhd
Releases · hyriver/pynhd
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
GeoConnex
class for queryingbybox
andbyfilter
. Note that CQL query is still not working due to an issue with the GeoConnex service. For now, it's recommended to use thebyfilter
method for most of the queries, including spatial queries. For simple spatial queries, you can use thebybox
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.
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.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 theflat
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.
v0.16.3
Release Notes
New Features
- Add support for LakeCat dataset in
streamcat
function. A new argument calledlakes_only
is added to the function. If set toTrue
, only metrics for lake and their associated catchments will be returned. The default isFalse
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 thefeature
argument. For all StreamCat queries, use thestreamcat
function instead. Now, theepa_nhd_catchments
function 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_l48
function, when the layer isNHDFlowline_Network
orNHDFlowline_NonNetwork
, merge allMultiLineString
geometries toLineString
.
v0.16.1
Release Notes
Bug Fixes
- Fix an issue in
network_xsection
andflowline_xsection
related to the changes inshapely
2 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 usepygeoapi
function withservice="elevation_profile"
(orPyGeoAPI
class) to access this new endpoint. Previously, theelevation_profile
endpoint was used for getting elevation profile along a path from two endpoints and the inputGeoDataFrame
must have been aMultiPoint
with two coordinates. Now, you must the input must containLineString
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 calledsmoothing
for controlling the number knots of the spline. Higher values result in smoother curves. The default value isNone
which uses all the points from the input flowline.
v0.15.2
Release Notes
Bug Fixes
- Update
GeoConnex
based on the latest changes in the web service.
v0.15.1
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
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
topynhd.nhdplus_l48
when reading the NHDPlus dataset. This speeds up the process sincepyarrow
is installed. - In
nhdplus_l48
makelayer
option sosql
parameter ofpyogrio.read_dataframe
can also be used. This is necessary sincepyogrio.read_dataframe
does not support passing bothlayer
andsql
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 supportingshapley>=2
.
Bug Fixes
- Remove unnecessary conversion of
id_col
andtoid_col
toInt64
innhdflw2nx
andvector_accumulation
. This ensures that the input data types are preserved. - Fix an issue in
nhdplus_l48
, where if the inputdata_dir
is not absolutepy7zr
fails to extract the file.