13#ifndef GDALALG_RASTER_AS_FEATURES_INCLUDED
14#define GDALALG_RASTER_AS_FEATURES_INCLUDED
16#include "gdalalg_abstract_pipeline.h"
24class GDALRasterAsFeaturesAlgorithm
25 :
public GDALPipelineStepAlgorithm
28 static constexpr const char *NAME =
"as-features";
29 static constexpr const char *DESCRIPTION =
30 "Create features from pixels of a raster dataset";
31 static constexpr const char *HELP_URL =
32 "/programs/gdal_raster_as_features.html";
34 explicit GDALRasterAsFeaturesAlgorithm(
bool standaloneStep =
false);
36 ~GDALRasterAsFeaturesAlgorithm()
override;
38 int GetInputType()
const override
43 int GetOutputType()
const override
49 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
51 std::vector<int> m_bands{};
52 std::string m_geomTypeName =
"none";
53 bool m_skipNoData =
false;
54 bool m_includeXY =
false;
55 bool m_includeRowCol =
false;
62class GDALRasterAsFeaturesAlgorithmStandalone final
63 :
public GDALRasterAsFeaturesAlgorithm
66 GDALRasterAsFeaturesAlgorithmStandalone()
67 : GDALRasterAsFeaturesAlgorithm( true)
71 ~GDALRasterAsFeaturesAlgorithmStandalone()
override;
#define GDAL_OF_RASTER
Allow raster drivers to be used.
Definition gdal.h:1086
#define GDAL_OF_VECTOR
Allow vector drivers to be used.
Definition gdal.h:1091