ASFHyP3 / asf-tools

A collection of GIS tools for working with higher-level SAR products
BSD 3-Clause "New" or "Revised" License
16 stars 5 forks source link

Add depreciation warning for hydrosar sub package #215

Closed jhkennedy closed 1 year ago

jhkennedy commented 1 year ago

The HydroSAR codes (everything now in asf_tools.hydrosar) are being migrated to the https://github.com/fjmeyer/HydroSAR repository to better facilitate collaboration and project credit (see https://github.com/fjmeyer/HydroSAR/pull/8).

This adds a depreciation warning for users using any of the hydroSAR codes.

It looks like this when importing/running in the Python/ipython interpreter: image

and like this if running one of the HydroSAR entrypoints:

$ water_map --help
/home/jhkennedy/Documents/Code/HyP3/asf-tools/src/asf_tools/hydrosar/__init__.py:15: FutureWarning: 
    ---------------------------------------------------------------------------
    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)
usage: water_map [-h] [--hand-raster HAND_RASTER] [--tile-shape TILE_SHAPE TILE_SHAPE] [--max-vv-threshold MAX_VV_THRESHOLD]
                 [--max-vh-threshold MAX_VH_THRESHOLD] [--hand-threshold HAND_THRESHOLD] [--hand-fraction HAND_FRACTION]
                 [--membership-threshold MEMBERSHIP_THRESHOLD] [-v]
                 out_raster vv_raster vh_raster

Generate surface water maps from Sentinel-1 RTC products Create a surface water extent map from a dual-pol Sentinel-1 RTC product and a HAND
image. The HAND image must be pixel-aligned (same extent and size) to the RTC images. The water extent maps are created using an adaptive
Expectation Maximization thresholding approach and refined using Fuzzy Logic.

positional arguments:
  out_raster            Water map GeoTIFF to create
  vv_raster             Sentinel-1 RTC GeoTIFF raster, in power scale, with VV polarization
  vh_raster             Sentinel-1 RTC GeoTIFF raster, in power scale, with VH polarization

options:
  -h, --help            show this help message and exit
  --hand-raster HAND_RASTER
                        Height Above Nearest Drainage (HAND) GeoTIFF aligned to the RTC rasters. If not specified, HAND data will be
                        extracted from the GLO-30 HAND. (default: None)
  --tile-shape TILE_SHAPE TILE_SHAPE
                        image tiles will have this shape (height, width) in pixels (default: (100, 100))
  --max-vv-threshold MAX_VV_THRESHOLD
                        Maximum threshold value to use for `vv_raster` in decibels (db) (default: -15.5)
  --max-vh-threshold MAX_VH_THRESHOLD
                        Maximum threshold value to use for `vh_raster` in decibels (db) (default: -23.0)
  --hand-threshold HAND_THRESHOLD
                        The maximum height above nearest drainage in meters to consider a pixel valid (default: 15.0)
  --hand-fraction HAND_FRACTION
                        The minimum fraction of valid HAND pixels required in a tile for thresholding (default: 0.8)
  --membership-threshold MEMBERSHIP_THRESHOLD
                        The average membership to the fuzzy indicators required for a water pixel (default: 0.45)
  -v, --verbose         Turn on verbose logging (default: False)
jhkennedy commented 1 year ago

Trufflehog is complaining about Jupyter Notebook changes since the last release and is safe to ignore