Filter Copy
When filtering data (e.g. filter_spatial
, filter_temporal
, filter_bands
), only the data that satisfies a condition is returned. For example, this condition could be a timestamp or interval, (a set of) coordinates, or specific bands. By applying filtering the datacube becomes smaller, according to the selected data.
Simplified filter([🌽, 🥔, 🐷], isVegetarian) => [🌽, 🥔]
In the image, the example datacube can be seen at the top with labeled dimensions. The filtering techniques are displayed separately below. On the left, the datacube is filtered temporally with the interval ["2020-10-15", "2020-10-27"]
. The result is a cube with only the rasters for the timestep that lies within that interval ("2020-10-25"
) and unchanged bands and spatial dimensions. Likewise, the original cube is filtered for a specific band ["nir"]
in the middle and a specific spatial region [Polygon(...)]
on the right.
Learn how to filter data with this interactive exercise: