Skip to content

Commit

Permalink
Merge pull request #215 from ASFHyP3/deprecate-hydrosar
Browse files Browse the repository at this point in the history
Add depreciation warning for hydrosar sub package
  • Loading branch information
jhkennedy authored Oct 26, 2023
2 parents 3faa5be + 620cba0 commit b9fdc26
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* the `asf_tools.hydrosar.floopd_map.make_flood_map` function now accepts a `iterative_min_size` keyword argument

### Changed
* The HydroSAR code (`flood_map`, `water_map`, and `hand`) in `asf_tools` has been isolated to a `asf_tools.hydrosar` sub-package
* The HydroSAR code (`flood_map`, `water_map`, and `hand`) in `asf_tools` has been isolated to an `asf_tools.hydrosar` sub-package
* The `asf_tools.hydrosar.flood_map.iterative` estimator now runs with a maximum step size of 3 instead of the default 0.5.
* The `asf_tools.hydrosar.flood_map.iterative` estimator now uses the mean of the iterative bounds at the initial guess.
* the known water threshold used to determine perennial water when creating flood maps will be calculated `asf_tools.hydrosar.flood_map.get_pw_threshold` if not provided
* `get_epsg_code` and `epsg_to_wkt` have been moved from`asf_tools.composite` to `asf_tools.util`
* `read_as_array` and `write_cog` have been moved from`asf_tools.composite` to `asf_tools.raster`
* `get_coordinates` has been moved from`asf_tools.flood_map` to `asf_tools.util`

### Deprecated
* The `asf_tools.hydrosar` sub-package is being moved to the [HydroSAR project repository](https://github.com/fjmeyer/hydrosar) and will be provided in a new pip/conda installable package `hydrosar`. The `asf_tools.hydrosar` subpackage will be removed in a future release.

### Fixed
* Reverted the special handling of nan values introduced in v0.5.2, now that GDAL v3.7.0 has been released.

Expand Down
15 changes: 13 additions & 2 deletions src/asf_tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ of the weights used to get the output average backscatter.

### Water extent mapping

>[!WARNING]
> The HydroSAR codes (`flood_map`, `water_map` and `hand` modules) are being
> moved to the [HydroSAR project repository](https://github.com/fjmeyer/hydrosar)
> and will be provided in a new pip/conda installable package `hydrosar`.
>
> The `asf_tools.hydrosar` subpackage will be removed in a future release.
The `water_map` tool allows you to create a surface water extent map from a Sentinel-1
dual-pol (VV+VH) RTC product. It is intended to be used with RTC products generated by
[ASF HyP3](https://hyp3-docs.asf.alaska.edu/using/vertex).
Expand All @@ -129,8 +136,12 @@ For details on the algorithm see the `asf_tools.water_map.make_water_map` docstr

### Flood depth mapping

**Warning:** The flood depth tool is still under active development and the products
created using this tool are likely to change in the future.
>[!WARNING]
> The HydroSAR codes (`flood_map`, `water_map` and `hand` modules) are being
> moved to the [HydroSAR project repository](https://github.com/fjmeyer/hydrosar)
> and will be provided in a new pip/conda installable package `hydrosar`.
>
> The `asf_tools.hydrosar` subpackage will be removed in a future release.
The `flood_map` tool allows you to create an estimated flood depth map from the surface
water extent map created by the `water_map` tool.
Expand Down
15 changes: 15 additions & 0 deletions src/asf_tools/hydrosar/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from warnings import warn

HYDROSAR_MOVE_WARNING = \
"""
---------------------------------------------------------------------------
The HydroSAR codes (`flood_map`, `water_map` and `hand` modules) are being
moved to the HydroSAR project repository:
<https://github.com/fjmeyer/hydrosar>
and will be provided in a new pip/conda installable package `hydrosar`.
The `asf_tools.hydrosar` subpackage will be removed in a future release.
----------------------------------------------------------------------------
"""

warn(HYDROSAR_MOVE_WARNING, category=FutureWarning)

0 comments on commit b9fdc26

Please sign in to comment.