13#ifndef GDALALG_VECTOR_MAKE_VALID_INCLUDED
14#define GDALALG_VECTOR_MAKE_VALID_INCLUDED
16#include "gdalalg_vector_geom.h"
24class GDALVectorMakeValidAlgorithm
25 :
public GDALVectorGeomAbstractAlgorithm
28 static constexpr const char *NAME =
"make-valid";
29 static constexpr const char *DESCRIPTION =
30 "Fix validity of geometries of a vector dataset.";
31 static constexpr const char *HELP_URL =
32 "/programs/gdal_vector_make_valid.html";
34 struct Options :
public GDALVectorGeomAbstractAlgorithm::OptionsBase
36 std::string m_method =
"linework";
37 bool m_keepLowerDim =
false;
40 std::unique_ptr<OGRLayerWithTranslateFeature>
41 CreateAlgLayer(OGRLayer &srcLayer)
override;
43 explicit GDALVectorMakeValidAlgorithm(
bool standaloneStep =
false);
46 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
55class GDALVectorMakeValidAlgorithmStandalone final
56 :
public GDALVectorMakeValidAlgorithm
59 GDALVectorMakeValidAlgorithmStandalone()
60 : GDALVectorMakeValidAlgorithm( true)
64 ~GDALVectorMakeValidAlgorithmStandalone()
override;