13#ifndef GDALALG_VECTOR_SORT_INCLUDED
14#define GDALALG_VECTOR_SORT_INCLUDED
16#include "gdalalg_vector_pipeline.h"
17#include "cpl_progress.h"
27class GDALVectorSortAlgorithm :
public GDALVectorPipelineStepAlgorithm
30 static constexpr const char *NAME =
"sort";
31 static constexpr const char *DESCRIPTION =
32 "Spatially order the features in a layer";
33 static constexpr const char *HELP_URL =
"/programs/gdal_vector_sort.html";
35 explicit GDALVectorSortAlgorithm(
bool standaloneStep =
false);
37 bool IsNativelyStreamingCompatible()
const override
43 bool RunStep(GDALPipelineStepRunContext &ctxt)
override;
45 std::string m_geomField{};
46 std::string m_sortMethod{
"hilbert"};
47 bool m_useTempfile{
false};
54class GDALVectorSortAlgorithmStandalone final :
public GDALVectorSortAlgorithm
57 GDALVectorSortAlgorithmStandalone()
58 : GDALVectorSortAlgorithm( true)
62 ~GDALVectorSortAlgorithmStandalone()
override;