GEOS  3.14.0dev
SimpleNoder.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  * Last port: noding/SimpleNoder.java rev. 1.7 (JTS-1.9)
16  *
17  **********************************************************************/
18 
19 #pragma once
20 
21 #include <geos/export.h>
22 
23 #include <vector>
24 
25 #include <geos/noding/SinglePassNoder.h>
26 #include <geos/noding/NodedSegmentString.h> // for inlined (FIXME)
27 
28 // Forward declarations
29 namespace geos {
30 namespace noding {
31 //class SegmentString;
32 }
33 }
34 
35 namespace geos {
36 namespace noding { // geos.noding
37 
38 
48 class GEOS_DLL SimpleNoder: public SinglePassNoder {
49 private:
50  std::vector<SegmentString*>* nodedSegStrings;
51  virtual void computeIntersects(SegmentString* e0, SegmentString* e1);
52 
53 public:
54  SimpleNoder(SegmentIntersector* nSegInt = nullptr)
55  :
56  SinglePassNoder(nSegInt)
57  {}
58 
59  void computeNodes(std::vector<SegmentString*>* inputSegmentStrings) override;
60 
61  std::vector<SegmentString*>*
62  getNodedSubstrings() const override
63  {
64  return NodedSegmentString::getNodedSubstrings(*nodedSegStrings);
65  }
66 };
67 
68 } // namespace geos.noding
69 } // namespace geos
70 
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
Nodes a set of SegmentStrings by performing a brute-force comparison of every segment to every other ...
Definition: SimpleNoder.h:48
std::vector< SegmentString * > * getNodedSubstrings() const override
Returns a Collection of fully noded SegmentStrings.
Definition: SimpleNoder.h:62
void computeNodes(std::vector< SegmentString * > *inputSegmentStrings) override
Computes the noding for a collection of SegmentStrings.
Base class for Noders which make a single pass to find intersections.
Definition: SinglePassNoder.h:48
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25