You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usage ="_FUNC_(data, mask, maskValues) - Generate a tile with the values from `data` tile but where cells in the `mask` tile are in the `maskValues` list, replace the value with NODATA.",
181
+
arguments ="""
182
+
Arguments:
183
+
* target - tile to mask
184
+
* mask - masking definition
185
+
* maskValues - sequence of values to consider as masks candidates
Copy file name to clipboardExpand all lines: docs/src/main/paradox/reference.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,35 +207,51 @@ SQL implementation does not accept a cell_type argument. It returns a float64 ce
207
207
208
208
## Masking and NoData
209
209
210
-
See @ref:[NoData handling](nodata-handling.md) for conceptual discussion of cell types and NoData.
210
+
See the @ref:[masking](masking.md)page for conceptual discussion of masking operations.
211
211
212
212
There are statistical functions of the count of data and NoData values per `tile` and aggregate over a `tile` column: @ref:[`rf_data_cells`](reference.md#rf-data-cells), @ref:[`rf_no_data_cells`](reference.md#rf-no-data-cells), @ref:[`rf_agg_data_cells`](reference.md#rf-agg-data-cells), and @ref:[`rf_agg_no_data_cells`](reference.md#rf-agg-no-data-cells).
213
213
214
214
Masking is a raster operation that sets specific cells to NoData based on the values in another raster.
215
215
216
216
### rf_mask
217
217
218
-
Tile rf_mask(Tile tile, Tile mask)
218
+
Tile rf_mask(Tile tile, Tile mask, bool inverse)
219
219
220
220
Where the `mask` contains NoData, replace values in the `tile` with NoData.
221
221
222
222
Returned `tile` cell type will be coerced to one supporting NoData if it does not already.
223
223
224
+
`inverse` is a literal not a Column. If `inverse` is true, return the `tile` with NoData in locations where the `mask`_does not_ contain NoData. Equivalent to @ref:[`rf_inverse_mask`](reference.md#rf-inverse-mask).
225
+
224
226
See also @ref:[`rf_rasterize`](reference.md#rf-rasterize).
225
227
228
+
### rf_mask_by_value
229
+
230
+
Tile rf_mask_by_value(Tile data_tile, Tile mask_tile, Int mask_value, bool inverse)
231
+
232
+
Generate a `tile` with the values from `data_tile`, with NoData in cells where the `mask_tile` is equal to `mask_value`.
233
+
234
+
`inverse` is a literal not a Column. If `inverse` is true, return the `data_tile` with NoData in locations where the `mask_tile` value is _not equal_ to `mask_value`. Equivalent to @ref:[`rf_inverse_mask_by_value`](reference.md#rf-inverse-mask-by-value).
Generate a `tile` with the values from `data_tile`, with NoData in cells where the `mask_tile` is in the `mask_values` Array or list. `mask_values` can be a [`pyspark.sql.ArrayType`][Array] or a `list`.
226
242
227
243
### rf_inverse_mask
228
244
229
245
Tile rf_inverse_mask(Tile tile, Tile mask)
230
246
231
247
Where the `mask`_does not_ contain NoData, replace values in `tile` with NoData.
232
248
233
-
### rf_mask_by_value
234
249
235
-
Tile rf_mask_by_value(Tile data_tile, Tile mask_tile, Int mask_value)
250
+
### rf_inverse_mask_by_value
236
251
237
-
Generate a `tile` with the values from `data_tile`, with NoData in cells where the `mask_tile` is equal to `mask_value`.
252
+
Tile rf_inverse_mask_by_value(Tile data_tile, Tile mask_tile, Int mask_value)
238
253
254
+
Generate a `tile` with the values from `data_tile`, with NoData in cells where the `mask_tile` is not equal to `mask_value`. In other words, only keep `data_tile` cells in locations where the `mask_tile` is equal to `mask_value`.
0 commit comments