GEOS 3.14.0dev
SegmentIntersectionTester.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7 * Copyright (C) 2006 Refractions Research Inc.
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 * Last port: operation/predicate/SegmentIntersectionTester.java r378 (JTS-1.12)
17 *
18 **********************************************************************/
19
20#pragma once
21
22#include <geos/export.h>
23
24#include <geos/algorithm/LineIntersector.h> // for composition
25#include <geos/geom/Coordinate.h> // for composition
26
27// Forward declarations
28namespace geos {
29namespace geom {
30class LineString;
31class CoordinateSequence;
32}
33}
34
35namespace geos {
36namespace operation { // geos::operation
37namespace predicate { // geos::operation::predicate
38
48
49private:
50
55 algorithm::LineIntersector li; // Robust
56
57 bool hasIntersectionVar;
58
59public:
60
61 SegmentIntersectionTester(): hasIntersectionVar(false) {}
62
63 bool hasIntersectionWithLineStrings(const geom::LineString& line,
64 const std::vector<const geom::LineString*>& lines);
65
66 bool hasIntersection(const geom::LineString& line,
67 const geom::LineString& testLine);
68
84 const geom::LineString& testLine);
85
86
87};
88
89} // namespace geos::operation::predicate
90} // namespace geos::operation
91} // namespace geos
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
Definition LineString.h:66
Tests if any line segments in two sets of CoordinateSequences intersect.
Definition SegmentIntersectionTester.h:47
bool hasIntersectionWithEnvelopeFilter(const geom::LineString &line, const geom::LineString &testLine)
Basic namespace for all GEOS functionalities.
Definition geos.h:39