rogerlew / wepppy

Other
12 stars 7 forks source link

SBS Map break assignment #259

Closed rogerlew closed 7 months ago

rogerlew commented 7 months ago

Improve break detection for SBS maps.

Also looks like the control is not remembering the nodata values after processing map

Revised break detection routine when no color table is present


  if breaks is None:
      # need to intuit breaks

      min_val = min(classes)
      max_val = max(classes)

      run = 1
      while min_val + run in classes:
          run += 1

      is256 = run > 4 or len(classes) > 7

      if is256:
          breaks = [0, 75, 109, 187]
      else:
          breaks = [min_val + i for i in range(4)]

      if max_val not in breaks and not is256:
          nodata_vals.append(k)
          classes.remove(k)

https://github.com/rogerlew/wepppy/blob/master/wepppy/nodb/mods/baer/sbs_map.py

rogerlew commented 7 months ago

Validation 1 - ME

sbs_smaller.zip

https://dev.wepp.cloud/weppcloud/runs/petty-megalomaniac/disturbed9002/

image

rogerlew commented 7 months ago

Validation 2 - PR

Caldor_SBS.zip

https://dev.wepp.cloud/weppcloud/runs/backless-blazer/disturbed9002/

image

rogerlew commented 7 months ago

Rattlesnake.zip

Validation 3 - Regression test

https://dev.wepp.cloud/weppcloud/runs/uninspired-ratiocination/disturbed9002/

image