GEOS: IteratedNoder.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

IteratedNoder.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/IteratedNoder.java r591 (JTS-1.12+)
16 *
17 **********************************************************************/
18
19 #ifndef GEOS_NODING_ITERATEDNODER_H
20 #define GEOS_NODING_ITERATEDNODER_H
21
22 #include <geos/export.h>
23
24 #include <vector>
25 #include <iostream>
26
27 #include <geos/inline.h>
28
29 #include <geos/algorithm/LineIntersector.h>
30 #include <geos/noding/SegmentString.h> // due to inlines
31 #include <geos/noding/Noder.h> // for inheritance
32
33 // Forward declarations
34 namespace geos {
35 namespace geom {
36 class PrecisionModel;
37 }
38 }
39
40 namespace geos {
41 namespace noding { // geos::noding
42
55 class GEOS_DLL IteratedNoder : public Noder { // implements Noder
56
57 private:
58 static const int MAX_ITER = 5;
59
60
61 const geom::PrecisionModel *pm;
62 algorithm::LineIntersector li;
63 std::vector<SegmentString*>* nodedSegStrings;
64 int maxIter;
65
70 void node(std::vector<SegmentString*>* segStrings,
71 int *numInteriorIntersections);
72
73 public:
74
75 IteratedNoder(const geom::PrecisionModel *newPm)
76 :
77 pm(newPm),
78 li(pm),
79 maxIter(MAX_ITER)
80 {
81 }
82
83 virtual ~IteratedNoder() {}
84
94 void setMaximumIterations(int n) { maxIter = n; }
95
96 std::vector<SegmentString*>* getNodedSubstrings() const {
97 return nodedSegStrings;
98 }
99
100
110 void computeNodes(std::vector<SegmentString*>* inputSegmentStrings); // throw(GEOSException);
111 };
112
113 } // namespace geos::noding
114 } // namespace geos
115
116
117 #endif // GEOS_NODING_ITERATEDNODER_H
geos::noding::IteratedNoder
Nodes a set of SegmentStrings completely.
Definition: IteratedNoder.h:55
geos::noding::IteratedNoder::getNodedSubstrings
std::vector< SegmentString * > * getNodedSubstrings() const
Returns a Collection of fully noded SegmentStrings. The SegmentStrings have the same context as their...
Definition: IteratedNoder.h:96
geos::geom::PrecisionModel
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:87
geos::algorithm::LineIntersector
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:49
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::noding::Noder
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:49
geos::noding::IteratedNoder::setMaximumIterations
void setMaximumIterations(int n)
Definition: IteratedNoder.h:94