Coverage Report

Created: 2025-10-12 06:49

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/geos/include/geos/noding/ValidatingNoder.h
Line
Count
Source
1
/**********************************************************************
2
 *
3
 * GEOS - Geometry Engine Open Source
4
 * http://geos.osgeo.org
5
 *
6
 * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
7
 *
8
 * This is free software; you can redistribute and/or modify it under
9
 * the terms of the GNU Lesser General Public Licence as published
10
 * by the Free Software Foundation.
11
 * See the COPYING file for more information.
12
 *
13
 **********************************************************************/
14
15
#pragma once
16
17
18
#include <geos/export.h>
19
#include <geos/noding/Noder.h>
20
21
#include <memory> // for unique_ptr
22
23
// Forward declarations
24
namespace geos {
25
namespace algorithm {
26
class LineIntersector;
27
}
28
namespace geom {
29
class Geometry;
30
}
31
}
32
33
namespace geos {
34
namespace noding { // geos.noding
35
36
/**
37
 * A wrapper for {@link noding::Noder}s which validates
38
 * the output arrangement is correctly noded.
39
 * An arrangement of line segments is fully noded if
40
 * there is no line segment
41
 * which has another segment intersecting its interior.
42
 * If the noding is not correct, a {@link util::TopologyException} is thrown
43
 * with details of the first invalid location found.
44
 *
45
 * @author mdavis
46
 *
47
 * @see FastNodingValidator
48
 *
49
 */
50
class GEOS_DLL ValidatingNoder : public Noder {
51
52
private:
53
54
    std::vector<SegmentString*>* nodedSS;
55
    noding::Noder& noder;
56
57
58
public:
59
60
    ValidatingNoder(Noder& noderArg)
61
115k
        : noder(noderArg)
62
115k
        {}
63
64
    void computeNodes(std::vector<SegmentString*>* segStrings) override;
65
66
    void validate();
67
68
    std::vector<SegmentString*>* getNodedSubstrings() const override;
69
70
};
71
72
} // namespace geos.noding
73
} // namespace geos
74