Add noise handling: SAR speckle filters, cloud masking, gap filling
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading the existing focal operations such as mean() and the map_overlap infrastructure, then narrow the proposal to the SAR speckle filters, which the issue identifies as the most self-contained piece. Done should mean a scoped preprocessing component is implemented consistently with those existing focal-operation patterns; the broader cloud-masking and spatial or temporal gap-filling work should be treated as separate follow-ups.
Written by the indexing model from the issue text.
Description
Problem
Working with real satellite imagery means dealing with noise, clouds, and data gaps before you can do any actual analysis. These preprocessing steps are currently left entirely to the user, even though the underlying operations (focal statistics, mask interpretation, interpolation) are things xarray-spatial already knows how to do.
Proposed scope
SAR speckle filters
Lee, Frost, and Gamma MAP filters for radar imagery. These are focal operations that use adaptive weighting based on local statistics (local mean, variance, number of looks). They fit naturally into the existing map_overlap infrastructure since they operate on moving windows, just like the current focal functions.
Cloud masking utilities
Interpret QA/SCL bands from Sentinel-2 and Landsat to produce clean binary masks. The band encoding differs between sensors and even between collection versions (Landsat 8 vs 9, Sentinel-2 L1C vs L2A), so having a single function that handles the lookup table for each sensor saves users from repeatedly consulting documentation.
Spatial gap filling
Fill masked pixels using focal interpolation from surrounding valid pixels. Inverse-distance weighting within a configurable search radius is the standard approach. This is useful after cloud masking or for filling no-data areas along swath edges.
Temporal gap filling
For time-stacked rasters, interpolate through time at each pixel location to fill cloud-masked dates. Linear interpolation is the baseline; optional smoothing (Savitzky-Golay or similar) handles cases where multiple consecutive dates are missing.
Implementation notes
- SAR filters are the most self-contained piece and could be a good starting point. They're structurally similar to existing focal operations like
mean()but with adaptive weighting, so the implementation pattern is already established. - Cloud masking is mostly lookup table work and doesn't involve heavy computation, but it has ongoing maintenance cost as sensor formats evolve.
- Gap filling (both spatial and temporal) depends on having a mask, so it pairs naturally with the cloud masking work.
- Dominant language
- Python
- Stars
- 972
- Forks
- 92
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xarray-contrib/xarray-spatial
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
xarray-contrib/xarray-spatial#3726 ·
-
api area:surface bug severity:medium sweep-api-consistency
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
xarray-contrib/xarray-spatial#3712 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
xarray-contrib/xarray-spatial#3710 ·
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
xarray-contrib/xarray-spatial#3707 ·
-
area:surface documentation user-guide-example
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
xarray-contrib/xarray-spatial#3464 ·
All issues in xarray-contrib/xarray-spatial
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100