Skip to content

Update STATIC workflow for new water mask spec#334

Open
nemo794 wants to merge 1 commit into
isce-framework:developfrom
nemo794:bugfix_static_water_mask_inverted
Open

Update STATIC workflow for new water mask spec#334
nemo794 wants to merge 1 commit into
isce-framework:developfrom
nemo794:bugfix_static_water_mask_inverted

Conversation

@nemo794

@nemo794 nemo794 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This PR updates to the STATIC Workflow to reflect the current specification for the NISAR Water Mask, which uses the classifications (Per JPL D-107710):

Layer classes:
0: Not water – an area with valid data that is not open water (class 1), high-backscattering water (class 2), low-backscattering
non-water (class 3), landcover masked (class 4), height above nearest drainage masked (class 5), layover/shadow masked
(class 6), or ocean masked (class 254). Masking can result in “not water” (class 0) where land cover masking is applied.
1 -100: Ocean distance – distance from the coastline (unit: km)
101 -200: Inland water distance – distance from the boundary between inland water and land (unit: km)
255: Fill value (no data)

Background

When the Static Workflow was originally implemented in #144 , the classification used by the NISAR water mask at that time was:

The input water distance map, in the format specified by the NISAR Water Mask
Product Specification\ [1]_. A value of 0 indicates a water pixel. A value of
255 represents a no-data (invalid) pixel. Values in 1-200 represent non-water
pixels.

However, for the current water mask TIFF files being used in mission operations, 0 designates not-water, and 1-200 designates water. Here is a screenshot of NISAR_water_mask_N33_N34_W119_W118_30m_v0.5.0.tif, provided by M Zahn:

Screenshot 2026-07-08 at 5 06 38 PM

Due to this discrepancy, the static layers workflow was generating waterMask layers with the binary values 0 and 1 inverted. This PR resolves the issue.

@hfattahi

hfattahi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for fixing the bug @nemo794 . Would you please confirm if you or Max have run this PR on one example and the water mask is fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants