13#ifndef GDALALG_VECTOR_SET_FIELD_TYPE_INCLUDED
14#define GDALALG_VECTOR_SET_FIELD_TYPE_INCLUDED
16#include "gdalalg_vector_pipeline.h"
24class GDALVectorSetFieldTypeAlgorithm
25 :
public GDALVectorPipelineStepAlgorithm
28 static constexpr const char *NAME =
"set-field-type";
29 static constexpr const char *DESCRIPTION =
30 "Modify the type of a field of a vector dataset.";
31 static constexpr const char *HELP_URL =
32 "/programs/gdal_vector_set_field_type.html";
34 explicit GDALVectorSetFieldTypeAlgorithm(
bool standaloneStep =
false);
36 CPLJSONObject Get_OGR_SCHEMA_OpenOption_Layer()
const override;
39 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
40 bool GlobalValidation()
const;
43 std::string m_activeLayer{};
44 std::string m_fieldName{};
47 std::string m_srcFieldTypeSubTypeStr{};
50 std::string m_newFieldTypeSubTypeStr{};
58class GDALVectorSetFieldTypeAlgorithmStandalone final
59 :
public GDALVectorSetFieldTypeAlgorithm
62 GDALVectorSetFieldTypeAlgorithmStandalone()
63 : GDALVectorSetFieldTypeAlgorithm( true)
67 ~GDALVectorSetFieldTypeAlgorithmStandalone()
override;
OGRFieldSubType
List of field subtypes.
Definition ogr_core.h:799
@ OFSTNone
No subtype.
Definition ogr_core.h:800
OGRFieldType
List of feature field types.
Definition ogr_core.h:772
@ OFTString
String of ASCII chars.
Definition ogr_core.h:777