13#ifndef GDALALG_VECTOR_BUFFER_INCLUDED
14#define GDALALG_VECTOR_BUFFER_INCLUDED
16#include "gdalalg_vector_geom.h"
24class GDALVectorBufferAlgorithm
25 :
public GDALVectorGeomAbstractAlgorithm
28 static constexpr const char *NAME =
"buffer";
29 static constexpr const char *DESCRIPTION =
30 "Compute a buffer around geometries of a vector dataset.";
31 static constexpr const char *HELP_URL =
"/programs/gdal_vector_buffer.html";
33 struct Options :
public GDALVectorGeomAbstractAlgorithm::OptionsBase
35 double m_distance = 0;
36 std::string m_endCapStyle =
"round";
37 std::string m_joinStyle =
"round";
38 double m_mitreLimit = 5;
39 int m_quadrantSegments = 8;
40 std::string m_side =
"both";
43 std::unique_ptr<OGRLayerWithTranslateFeature>
44 CreateAlgLayer(OGRLayer &srcLayer)
override;
46 explicit GDALVectorBufferAlgorithm(
bool standaloneStep =
false);
49 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
58class GDALVectorBufferAlgorithmStandalone final
59 :
public GDALVectorBufferAlgorithm
62 GDALVectorBufferAlgorithmStandalone()
63 : GDALVectorBufferAlgorithm( true)
67 ~GDALVectorBufferAlgorithmStandalone()
override;