Focal operations#
-
template<typename Policies, typename Kernel>
auto convolve(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with the convolution of array with the weights of kernel.
For each focal cell the input cells within the neighbourhood are multiplied by the corresponding weight and summed.
No-data values are filled unless all values within the neighbourhood are no-data.
See focal_sum() for an algorithm that sums values using boolean weights (represented by integrals).
-
template<typename Policies, typename Kernel>
auto focal_diversity(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the number of unique element values found in the cells within the corresponding focal neighbourhood.
No-data values are filled unless all values within the neighbourhood are no-data.
-
template<typename Policies, typename Kernel>
auto focal_high_pass(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># No-data in input focal cells are propagated to output focal cells. No-data values in neighbourhood cells are skipped.
- Template Parameters:
. –
- Parameters:
. –
- Throws:
. –
- Returns:
.
-
template<typename Policies, typename Kernel>
auto focal_majority(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the most occurring element value found in the cells within the corresponding focal neighbourhood.
No-data values are filled unless all values within the neighbourhood are no-data.
-
template<typename Policies, typename Kernel>
auto focal_maximum(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the maximum element value found in the cells within the corresponding focal neighbourhood.
No-data values are filled unless all values within the neighbourhood are no-data.
-
template<typename Policies, typename Kernel>
auto focal_mean(Policies const &policies, PartitionedArray<lue::policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<lue::policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the mean element value found in the cells within the corresponding focal neighbourhood.
No-data in input focal cells are propagated to output focal cells. No-data values in neighbourhood cells are skipped.
-
template<typename Policies, typename Kernel>
auto focal_minimum(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the minimum element value found in the cells within the corresponding focal neighbourhood.
No-data values are filled unless all values within the neighbourhood are no-data.
-
template<typename Policies, typename Kernel>
auto focal_sum(Policies const &policies, PartitionedArray<policy::InputElementT<Policies, 0>, 2> const &array, Kernel const &kernel) -> PartitionedArray<policy::OutputElementT<Policies, 0>, 2># Return an array with per cell the sum of all values within the corresponding focal neighbourhood.
No-data values are filled unless all values within the neighbourhood are no-data.