GEOS 3.13.1
EdgeSegmentIntersector.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (c) 2024 Martin Davis
7 * Copyright (C) 2024 Paul Ramsey <pramsey@cleverelephant.ca>
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16#pragma once
17
18
19#include <geos/noding/SegmentIntersector.h>
20#include <geos/algorithm/LineIntersector.h>
21#include <geos/export.h>
22
23
24// Forward declarations
25namespace geos {
26namespace noding {
27 class SegmentString;
28}
29namespace operation {
30namespace relateng {
31 class RelateSegmentString;
32 class TopologyComputer;
33}
34}
35}
36
37
41
42
43namespace geos { // geos.
44namespace operation { // geos.operation
45namespace relateng { // geos.operation.relateng
46
47class GEOS_DLL EdgeSegmentIntersector : public SegmentIntersector {
48
49private:
50
51 // Members
53 TopologyComputer& topoComputer;
54
55 // Methods
56
57
58 void addIntersections(
59 RelateSegmentString* ssA, std::size_t segIndexA,
60 RelateSegmentString* ssB, std::size_t segIndexB);
61
62
63public:
64
65 EdgeSegmentIntersector(TopologyComputer& p_topoComputer)
66 : topoComputer(p_topoComputer)
67 {};
68
69 void processIntersections(
70 SegmentString* ss0, std::size_t segIndex0,
71 SegmentString* ss1, std::size_t segIndex1) override;
72
73 bool isDone() const override;
74
75};
76
77} // namespace geos.operation.relateng
78} // namespace geos.operation
79} // namespace geos
80
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
Processes possible intersections detected by a Noder.
Definition noding/SegmentIntersector.h:45
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition geos.h:39