GEOS  3.13.0dev
FastSegmentSetIntersectionFinder.h
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  * Last port: noding/FastSegmentSetIntersectionFinder.java r388 (JTS-1.12)
17  *
18  **********************************************************************/
19 
20 #pragma once
21 
22 #include <geos/algorithm/LineIntersector.h>
23 #include <geos/noding/SegmentString.h>
24 #include <geos/noding/MCIndexSegmentSetMutualIntersector.h>
25 
26 #include <memory>
27 
28 //forward declarations
29 namespace geos {
30 namespace noding {
31 class SegmentIntersectionDetector;
32 class SegmentSetMutualIntersector;
33 //class MCIndexSegmentSetMutualIntersector : public SegmentSetMutualIntersector;
34 }
35 }
36 
37 
38 namespace geos {
39 namespace noding { // geos::noding
40 
51 private:
52  std::unique_ptr<MCIndexSegmentSetMutualIntersector> segSetMutInt;
53  std::unique_ptr<geos::algorithm::LineIntersector> lineIntersector;
54 
55 protected:
56 public:
57  FastSegmentSetIntersectionFinder(SegmentString::ConstVect* baseSegStrings);
58 
60 
69  {
70  return segSetMutInt.get();
71  }
72 
73  bool intersects(SegmentString::ConstVect* segStrings);
74  bool intersects(SegmentString::ConstVect* segStrings, SegmentIntersectionDetector* intDetector);
75 
76 };
77 
78 } // geos::noding
79 } // geos
80 
Finds if two sets of SegmentStrings intersect.
Definition: FastSegmentSetIntersectionFinder.h:50
const SegmentSetMutualIntersector * getSegmentSetIntersector() const
Definition: FastSegmentSetIntersectionFinder.h:68
Detects and records an intersection between two SegmentStrings, if one exists.
Definition: SegmentIntersectionDetector.h:41
An intersector for the red-blue intersection problem.
Definition: SegmentSetMutualIntersector.h:36
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25