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/SegmentSetMutualIntersector.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
16
#pragma once
17
18
#include <geos/noding/SegmentString.h>
19
#include <geos/noding/SegmentIntersector.h>
20
21
namespace geos {
22
namespace noding { // geos::noding
23
24
/** \brief
25
 * An intersector for the red-blue intersection problem.
26
 *
27
 * In this class of line arrangement problem,
28
 * two disjoint sets of linestrings are provided.
29
 * It is assumed that within
30
 * each set, no two linestrings intersect except possibly at their endpoints.
31
 * Implementations can take advantage of this fact to optimize processing.
32
 *
33
 * @author Martin Davis
34
 * @version 1.10
35
 */
36
class GEOS_DLL SegmentSetMutualIntersector {
37
public:
38
39
    SegmentSetMutualIntersector()
40
0
        : segInt(nullptr)
41
0
    {}
42
43
    virtual
44
0
    ~SegmentSetMutualIntersector() {}
45
46
    /**
47
     * Sets the SegmentIntersector to use with this intersector.
48
     * The SegmentIntersector will either record or add intersection nodes
49
     * for the input segment strings.
50
     *
51
     * @param si the segment intersector to use
52
     */
53
    void
54
    setSegmentIntersector(SegmentIntersector* si)
55
0
    {
56
0
        segInt = si;
57
0
    }
58
59
    /**
60
     *
61
     * @param segStrings a collection of [SegmentStrings](@ref SegmentString) to node
62
     */
63
    virtual void setBaseSegments(SegmentString::ConstVect* segStrings) = 0;
64
65
    /**
66
     * Computes the intersections for two collections of [SegmentStrings](@ref SegmentString).
67
     *
68
     * @param segStrings a collection of [SegmentStrings](@ref SegmentString) to node
69
     */
70
    virtual void process(SegmentString::ConstVect* segStrings) = 0;
71
72
protected:
73
74
    SegmentIntersector* segInt;
75
76
};
77
78
} // geos::noding
79
} // geos
80