13#ifndef GDALALG_VECTOR_RASTERIZE_INCLUDED
14#define GDALALG_VECTOR_RASTERIZE_INCLUDED
19#include "gdalalg_abstract_pipeline.h"
27class GDALVectorRasterizeAlgorithm
28 :
public GDALPipelineStepAlgorithm
31 static constexpr const char *NAME =
"rasterize";
32 static constexpr const char *DESCRIPTION =
33 "Burns vector geometries into a raster.";
34 static constexpr const char *HELP_URL =
35 "/programs/gdal_vector_rasterize.html";
37 explicit GDALVectorRasterizeAlgorithm(
bool standaloneStep =
false);
39 bool IsNativelyStreamingCompatible()
const override
45 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
46 bool RunImpl(GDALProgressFunc pfnProgress,
void *pProgressData)
override;
48 int GetInputType()
const override
53 int GetOutputType()
const override
58 std::vector<int> m_bands{};
59 bool m_invert =
false;
60 bool m_allTouched =
false;
61 std::vector<double> m_burnValues{};
62 std::string m_attributeName{};
65 std::string m_layerName{};
66 std::string m_where{};
68 std::string m_dialect{};
69 double m_nodata = std::numeric_limits<double>::quiet_NaN();
70 std::vector<double> m_initValues{};
72 std::vector<std::string> m_transformerOption{};
73 std::vector<double> m_targetExtent{};
79 std::string m_outputType{};
80 std::string m_optimization{};
87class GDALVectorRasterizeAlgorithmStandalone final
88 :
public GDALVectorRasterizeAlgorithm
91 GDALVectorRasterizeAlgorithmStandalone()
92 : GDALVectorRasterizeAlgorithm( true)
96 ~GDALVectorRasterizeAlgorithmStandalone()
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