GDAL
gdalalg_vector_convex_hull.h
1/******************************************************************************
2 *
3 * Project: GDAL
4 * Purpose: "gdal vector convex-hull"
5 * Author: Daniel Baston
6 *
7 ******************************************************************************
8 * Copyright (c) 2026, ISciences LLC
9 *
10 * SPDX-License-Identifier: MIT
11 ****************************************************************************/
12
13#ifndef GDALALG_VECTOR_CONVEX_HULL_INCLUDED
14#define GDALALG_VECTOR_CONVEX_HULL_INCLUDED
15
16#include "gdalalg_vector_geom.h"
17
19
20class GDALVectorConvexHullAlgorithm /* non final */
21 : public GDALVectorGeomAbstractAlgorithm
22{
23 public:
24 static constexpr const char *NAME = "convex-hull";
25 static constexpr const char *DESCRIPTION =
26 "Compute the convex hull of geometries of a vector dataset.";
27 static constexpr const char *HELP_URL =
28 "/programs/gdal_vector_convex_hull.html";
29
30 struct Options : public GDALVectorGeomAbstractAlgorithm::OptionsBase
31 {
32 };
33
34 std::unique_ptr<OGRLayerWithTranslateFeature>
35 CreateAlgLayer(OGRLayer &srcLayer) override;
36
37 explicit GDALVectorConvexHullAlgorithm(bool standaloneStep = false);
38
39 private:
40 bool RunStep(GDALPipelineStepRunContext &ctxt) override;
41
42 Options m_opts{};
43};
44
45class GDALVectorConvexHullAlgorithmStandalone final
46 : public GDALVectorConvexHullAlgorithm
47{
48 public:
49 GDALVectorConvexHullAlgorithmStandalone()
50 : GDALVectorConvexHullAlgorithm(/* standaloneStep = */ true)
51 {
52 }
53
54 ~GDALVectorConvexHullAlgorithmStandalone() override;
55};
56
58
59#endif /* GDALALG_VECTOR_CONVEX_HULL_INCLUDED */
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61