13#ifndef GDALALG_RASTER_NEIGHBORS_INCLUDED
14#define GDALALG_RASTER_NEIGHBORS_INCLUDED
16#include "gdalalg_raster_pipeline.h"
24class GDALRasterNeighborsAlgorithm :
public GDALRasterPipelineStepAlgorithm
27 explicit GDALRasterNeighborsAlgorithm(
bool standaloneStep =
false) noexcept;
29 static constexpr const
char *NAME =
"neighbors";
30 static constexpr const
char *DESCRIPTION =
31 "Compute the value of each pixel from its neighbors (focal statistics)";
32 static constexpr const
char *HELP_URL =
33 "/programs/gdal_raster_neighbors.html";
35 static std::vector<std::
string> GetAliasesStatic()
37 return {
"neighbours"};
41 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
44 std::vector<std::string> m_method{};
46 std::vector<std::string> m_kernel{};
48 std::string m_nodata{};
55class GDALRasterNeighborsAlgorithmStandalone final
56 :
public GDALRasterNeighborsAlgorithm
59 GDALRasterNeighborsAlgorithmStandalone()
60 : GDALRasterNeighborsAlgorithm( true)
64 ~GDALRasterNeighborsAlgorithmStandalone()
override;