Coverage Report

Created: 2025-11-12 06:13

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/geos/include/geos/noding/Noder.h
Line
Count
Source
1
/**********************************************************************
2
 *
3
 * GEOS - Geometry Engine Open Source
4
 * http://geos.osgeo.org
5
 *
6
 * Copyright (C) 2006      Refractions Research Inc.
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
#include <geos/export.h>
18
19
#include <vector>
20
#include <iostream>
21
22
// Forward declarations
23
namespace geos {
24
namespace noding {
25
class SegmentString;
26
}
27
}
28
29
namespace geos {
30
namespace noding { // geos.noding
31
32
33
/** \brief
34
 * Computes all intersections between segments in a set of SegmentString.
35
 *
36
 * Intersections found are represented as [SegmentNodes](@ref SegmentNode) and
37
 * added to the [SegmentStrings](@ref SegmentString) in which they occur.
38
 * As a final step in the noding a new set of segment strings split
39
 * at the nodes may be returned.
40
 *
41
 * Last port: noding/Noder.java rev. 1.8 (JTS-1.7)
42
 *
43
 * TODO: this was really an interface, we should avoid making it a Base class
44
 *
45
 */
46
class GEOS_DLL Noder {
47
public:
48
    /** \brief
49
     * Computes the noding for a collection of [SegmentStrings](@ref SegmentString).
50
     *
51
     * Some Noders may add all these nodes to the input SegmentStrings;
52
     * others may only add some or none at all.
53
     *
54
     * @param segStrings a collection of {@link SegmentString}s to node
55
     *        The caller remains responsible for releasing the memory
56
     *        associated with the container and its elements.
57
     */
58
    virtual void computeNodes(std::vector<SegmentString*>* segStrings) = 0;
59
60
    /** \brief
61
     * Returns a collection of fully noded [SegmentStrings](@ref SegmentString).
62
     * The SegmentStrings have the same context as their parent.
63
     *
64
     * @return a newly allocated std::vector of newly allocated
65
     *         SegmentStrings (copies of input, if needs be).
66
     *         Caller is responsible to delete container and elements.
67
     */
68
    virtual std::vector<SegmentString*>* getNodedSubstrings() const = 0;
69
70
    virtual
71
601k
    ~Noder() {}
72
73
protected:
74
601k
    Noder() {}
75
};
76
77
} // namespace geos.noding
78
} // namespace geos
79