Skip to content

Commit 8134ca9

Browse files
vpipktmetasim
authored andcommitted
Mark final code chunk as executable in masking page
Signed-off-by: Jason T. Brown <[email protected]>
1 parent 4b2c72b commit 8134ca9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyrasterframes/src/main/python/docs/masking.pymd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ to_clip.select('clip_raster', 'blue_masked') \
125125

126126
Finally, we create a new _tile_ column with the blue band clipped to our circle. Again we will use the `rf_mask` function to pass the NoData regions along from the rasterized geometry.
127127

128+
```python, clip
128129
clipped = to_clip.select('blue_masked',
129130
'clip_raster',
130131
rf_mask('blue_masked', 'clip_raster').alias('blue_clipped')) \
131132
.filter(rf_data_cells('clip_raster') > 20) \
132133
.orderBy(rf_data_cells('clip_raster'))
133-
134+
```
134135

135136
This kind of clipping technique is further used in @ref:[zonal statistics](zonal-algebra.md).

0 commit comments

Comments
 (0)