New Features ~~~~~~~~~~~~ - Add a new class called ``NHD`` for accessing the latest National Hydrography Dataset. More info regarding this data can be found `here <https://hydro.nationalmap.gov/arcgis/rest/services/nhd/MapServer>`__. - Add two new functions for getting cross-sections along a single flowline via ``flowline_xsection`` or throughout a network of flowlines via ``network_xsection``. You can specify spacing and width parameters to control their location. For more information and examples please consult the documentation. - Add a new property to ``AGRBase`` called ``service_info`` to include some useful info about the service including ``feature_types`` which can be handy for converting numeric values of types to their string equivalent.
Internal Changes ~~~~~~~~~~~~~~~~ - Use the new PyGeoAPI API. - Refactor ``prepare_nhdplus`` for improving the performance and robustness of determining ``tocomid`` within a network of NHD flowlines. - Add empty geometries that ``NLDI.getbasins`` returns to the list of ``not found`` IDs. This is because the NLDI service does not include non-network flowlines and instead returns an empty geometry for these flowlines. (:issue_nhd:`48`)
0.12.1
-------------------
Internal Changes ~~~~~~~~~~~~~~~~ - Use the three new ``ar.retrieve_*`` functions instead of the old ``ar.retrieve`` function to improve type hinting and to make the API more consistent. - Revert to the original PyGeoAPI base URL.
0.12.0
-------------------
Breaking Changes ~~~~~~~~~~~~~~~~ - Rewrite ``ScienceBase`` to make it applicable for working with other ScienceBase items. A new function has been added for staging the Additional NHDPlus attributes items called ``stage_nhdplus_attrs``. - Refactor ``AGRBase`` to remove unnecessary functions and make them more general. - Update ``PyGeoAPI`` class to conform to the new ``pygeoapi`` API. This web service is undergoing some changes at the time of this release and the API is not stable, might not work as expected. As soon as the web service is stable, a new version will be released.
New Features ~~~~~~~~~~~~ - In ``WaterData.byid`` show a warning if there are any missing feature IDs that are requested but are not available in the dataset. - For all ``by*`` methods of ``WaterData`` throw a ``ZeroMatched`` exception if no features are found. - Add ``expire_after`` and ``disable_caching`` arguments to all functions that use ``async_retriever``. Set the default request caching expiration time to never expire. You can use ``disable_caching`` if you don't want to use the cached responses. Please refer to documentation of the functions for more details.
Internal Changes ~~~~~~~~~~~~~~~~ - Refactor ``prepare_nhdplus`` to reduce code complexity by grouping all the NHDPlus tools as a private class. - Modify ``AGRBase`` to reflect the latest API changes in ``pygeoogc.ArcGISRESTfull`` class. - Refactor ``prepare_nhdplus`` by creating a private class that includes all the previously used private functions. This will make the code more readable and easier to maintain. - Add all the missing types so ``mypy --strict`` passes.
0.11.4
-------------------
New Features ~~~~~~~~~~~~ - Add a new argument to ``NLDI.get_basins`` called ``split_catchment`` that if is set to ``True`` will split the basin geometry at the watershed outlet.
Internal Changes ~~~~~~~~~~~~~~~~ - Catch service errors in ``PyGeoAPI`` and show useful error messages. - Use ``importlib-metadata`` for getting the version instead of ``pkg_resources`` to decrease import time as discussed in this `issue <https://github.com/pydata/xarray/issues/5676>`__.
0.11.3
-------------------
Internal Changes ~~~~~~~~~~~~~~~~ - More robust handling of inputs and outputs of ``NLDI``'s methods. - Use an alternative download link for NHDPlus VAA file on Hydroshare. - Restructure the codebase to reduce the complexity of ``pynhd.py`` file by dividing it into three files: ``pynhd`` all classes that provide access to the supported web services, ``core`` that includes base classes, and ``nhdplus_derived`` that has functions for getting databases that provided additional attributes for the NHDPlus database.
0.11.2
-------------------
New Features ~~~~~~~~~~~~ - Add support for `PyGeoAPI <https://labs.waterdata.usgs.gov/api/nldi/pygeoapi>`__. It offers four functionalities: ``flow_trace``, ``split_catchment``, ``elevation_profile``, and ``cross_section``.