13#ifndef GDALALG_RASTER_POLYGONIZE_INCLUDED
14#define GDALALG_RASTER_POLYGONIZE_INCLUDED
16#include "gdalalg_abstract_pipeline.h"
24class GDALRasterPolygonizeAlgorithm
25 :
public GDALPipelineStepAlgorithm
28 static constexpr const char *NAME =
"polygonize";
29 static constexpr const char *DESCRIPTION =
30 "Create a polygon feature dataset from a raster band.";
31 static constexpr const char *HELP_URL =
32 "/programs/gdal_raster_polygonize.html";
34 explicit GDALRasterPolygonizeAlgorithm(
bool standaloneStep =
false);
36 bool IsNativelyStreamingCompatible()
const override
41 int GetInputType()
const override
46 int GetOutputType()
const override
52 CanHandleNextStep(GDALPipelineStepAlgorithm *poNextStep)
const override;
55 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
56 bool RunImpl(GDALProgressFunc pfnProgress,
void *pProgressData)
override;
60 std::string m_attributeName =
"DN";
61 bool m_connectDiagonalPixels =
false;
64 int m_commitInterval = 0;
71class GDALRasterPolygonizeAlgorithmStandalone final
72 :
public GDALRasterPolygonizeAlgorithm
75 GDALRasterPolygonizeAlgorithmStandalone()
76 : GDALRasterPolygonizeAlgorithm( true)
80 ~GDALRasterPolygonizeAlgorithmStandalone()
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