Skip to content

Instantly share code, notes, and snippets.

@MatthewJA
Created October 23, 2020 04:37
Show Gist options
  • Save MatthewJA/e754ab7ed6c58f582e6fe9ea57e699d5 to your computer and use it in GitHub Desktop.
Save MatthewJA/e754ab7ed6c58f582e6fe9ea57e699d5 to your computer and use it in GitHub Desktop.
products:
ls8_MNDWI:
recipe:
transform: expressions
output:
MNDWI:
formula: (green - swir1) / (green + swir1)
dtype: float32
input:
transform: apply_mask
mask_measurement_name: fmask
input:
transform: expressions
output:
fmask:
formula: (fmask == 1) | (fmask == 5)
nodata: False
green: green
swir1: swir1
input:
product: ga_ls8c_ard_3
measurements: [green, swir1, fmask]
output_crs: EPSG:3577
resolution: [-30, 30]
resampling:
fmask: nearest
'*': average
s2a_MNDWI:
recipe:
transform: expressions
output:
MNDWI:
formula: (nbart_green - nbart_swir_2) / (nbart_green + nbart_swir_2)
dtype: float32
input:
transform: apply_mask
mask_measurement_name: fmask
input:
transform: expressions
output:
fmask:
formula: (fmask == 1) | (fmask == 5)
nodata: False
nbart_green: nbart_green
nbart_swir_2: nbart_swir_2
input:
collate:
- product: s2b_ard_granule
measurements: [nbart_green, nbart_swir_2, fmask]
output_crs: EPSG:3577
resolution: [-10, 10]
resampling:
fmask: nearest
'*': average
- product: s2a_ard_granule
measurements: [nbart_green, nbart_swir_2, fmask]
output_crs: EPSG:3577
resolution: [-10, 10]
resampling:
fmask: nearest
'*': average
wofs_masked:
recipe:
transform: expressions
output:
water:
formula: water
nodata: -1
input:
transform: apply_mask
mask_measurement_name: mask
input:
transform: expressions
output:
mask:
formula: (water == 0) | (water == 128)
nodata: False
water:
formula: water
nodata: -1
input:
product: wofs_albers
measurements: [water]
output_crs: EPSG:3577
resolution: [-25, 25]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment