13#ifndef GDALALG_VECTOR_CREATE_INCLUDED
14#define GDALALG_VECTOR_CREATE_INCLUDED
16#include "gdalalg_vector_pipeline.h"
24class GDALVectorCreateAlgorithm
25 :
public GDALVectorPipelineStepAlgorithm
28 static constexpr const char *NAME =
"create";
29 static constexpr const char *DESCRIPTION =
"Create a vector dataset.";
30 static constexpr const char *HELP_URL =
"/programs/gdal_vector_create.html";
32 explicit GDALVectorCreateAlgorithm(
bool =
true);
35 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
36 bool RunImpl(GDALProgressFunc pfnProgress,
void *pProgressData)
override;
43 std::vector<OGRFieldDefn> GetOutputFields()
const;
45 bool CanBeFirstStep()
const override
50 bool CanBeMiddleStep()
const override
55 bool CanBeLastStep()
const override
66 const std::string &fidColumnName,
67 const std::vector<OGRFieldDefn> &fieldDefinitions,
68 const std::vector<OGRGeomFieldDefn> &geometryFieldDefinitions)
const;
71 std::string m_fidColumnName{};
72 std::string m_geometryType{};
73 std::string m_geometryFieldName{
"geom"};
74 std::string m_schemaJsonOrPath{};
75 std::vector<OGRFieldDefn> m_fieldDefinitions{};
76 std::vector<std::string> m_fieldStrDefinitions{};
83class GDALVectorCreateAlgorithmStandalone final
84 :
public GDALVectorCreateAlgorithm
87 GDALVectorCreateAlgorithmStandalone()
88 : GDALVectorCreateAlgorithm( true)
92 ~GDALVectorCreateAlgorithmStandalone()
override;
A set of associated raster bands, usually from one file.
Definition gdal_dataset.h:77