Skip to content

Commit

Permalink
Add explanation for using nhdplushr auto_switch and service args.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheginit committed Feb 17, 2021
1 parent 9b701d9 commit e8165db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Breaking Changes
makes getting geometries easier and faster.
- Remove ``characteristics_dataframe`` method from ``NLDI`` and made a standalone function
called ``nhdplus_attrs`` for accessing NHDPlus attributes directly from ScienceBase.
- Add support for using `hydro <https://hydro.nationalmap.gov/arcgis/rest/services/NHDPlus_HR/MapServer>`_
or `edits <https://edits.nationalmap.gov/arcgis/rest/services/NHDPlus_HR/NHDPlus_HR/MapServer>`_
webs services for getting NHDPlus High-Resolution using ``NHDPlusHR`` function. The new arguments
are ``service`` which accepts ``hydro`` or ``edits``, and ``autos_switch`` flag for automatically
switching to the other service if the ones passed by ``service`` fails.

New Features
~~~~~~~~~~~~
Expand Down
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,24 @@ points <https://www.sciencebase.gov/catalog/item/5762b664e4b07657d19a71ea>`__:
:align: center

Next, we retrieve the medium- and high-resolution flowlines within the bounding box of our
watershed and compare them.
watershed and compare them. Moreover, Since serveral web services offer access to NHDPlus database,
``NHDPlusHR`` has an argument for selecting a service and also an argument for automatically
switching between services.

.. code:: python
mr = WaterData("nhdflowline_network")
nhdp_mr = mr.bybox(basin.geometry[0].bounds)
hr = NHDPlusHR("networknhdflowline")
hr = NHDPlusHR("networknhdflowline", service="hydro", auto_switch=True)
nhdp_hr = hr.bygeom(basin.geometry[0].bounds)
.. image:: https://raw.githubusercontent.com/cheginit/hydrodata/master/docs/_static/hr_mr.png
:target: https://raw.githubusercontent.com/cheginit/hydrodata/master/docs/_static/hr_mr.png
:width: 400
:align: center

Additionally, ``WaterData`` can find features within a given radius (in meters) of a point:
Moreover, ``WaterData`` can find features within a given radius (in meters) of a point:

.. code:: python
Expand Down

0 comments on commit e8165db

Please sign in to comment.