Coverage Report

Created: 2026-07-25 06:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/gdal/apps/gdalalg_vector_check_geometry.h
Line
Count
Source
1
/******************************************************************************
2
*
3
 * Project:  GDAL
4
 * Purpose:  "gdal vector check-geometry"
5
 * Author:   Daniel Baston
6
 *
7
 ******************************************************************************
8
 * Copyright (c) 2025, ISciences LLC
9
 *
10
 * SPDX-License-Identifier: MIT
11
 ****************************************************************************/
12
13
#ifndef GDALALG_VECTOR_CHECK_GEOMETRY_INCLUDED
14
#define GDALALG_VECTOR_CHECK_GEOMETRY_INCLUDED
15
16
#include "gdalvectorpipelinestepalgorithm.h"
17
18
#include "cpl_progress.h"
19
20
#include <string>
21
22
//! @cond Doxygen_Suppress
23
24
/************************************************************************/
25
/*                   GDALVectorCheckGeometryAlgorithm                   */
26
/************************************************************************/
27
28
class GDALVectorCheckGeometryAlgorithm : public GDALVectorPipelineStepAlgorithm
29
{
30
  public:
31
    static constexpr const char *NAME = "check-geometry";
32
    static constexpr const char *DESCRIPTION =
33
        "Check a dataset for invalid geometries";
34
    static constexpr const char *HELP_URL =
35
        "/programs/gdal_vector_check_geometry.html";
36
37
    explicit GDALVectorCheckGeometryAlgorithm(bool standaloneStep = false);
38
39
  private:
40
    bool RunStep(GDALPipelineStepRunContext &ctxt) override;
41
42
    std::vector<std::string> m_includeFields{};
43
    std::string m_geomField{};
44
    bool m_includeValid{false};
45
};
46
47
/************************************************************************/
48
/*              GDALVectorCheckGeometryAlgorithmStandalone              */
49
/************************************************************************/
50
51
class GDALVectorCheckGeometryAlgorithmStandalone final
52
    : public GDALVectorCheckGeometryAlgorithm
53
{
54
  public:
55
    GDALVectorCheckGeometryAlgorithmStandalone()
56
0
        : GDALVectorCheckGeometryAlgorithm(/* standaloneStep = */ true)
57
0
    {
58
0
    }
59
60
    ~GDALVectorCheckGeometryAlgorithmStandalone() override;
61
};
62
63
//! @endcond
64
65
#endif /* GDALALG_VECTOR_CHECK_GEOMETRY_INCLUDED */