| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
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
|
|
|
|
|
|
|
#ifndef GEOS_NODING_SIMPLENODER_H |
|
20
|
|
|
|
|
|
|
#define GEOS_NODING_SIMPLENODER_H |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#include |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
#include |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#include |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#include |
|
29
|
|
|
|
|
|
|
#include // for inlined (FIXME) |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
// Forward declarations |
|
32
|
|
|
|
|
|
|
namespace geos { |
|
33
|
|
|
|
|
|
|
namespace noding { |
|
34
|
|
|
|
|
|
|
//class SegmentString; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
namespace geos { |
|
39
|
|
|
|
|
|
|
namespace noding { // geos.noding |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
/** \brief |
|
43
|
|
|
|
|
|
|
* Nodes a set of {@link SegmentString}s by |
|
44
|
|
|
|
|
|
|
* performing a brute-force comparison of every segment to every other one. |
|
45
|
|
|
|
|
|
|
* |
|
46
|
|
|
|
|
|
|
* This has n^2 performance, so is too slow for use on large numbers |
|
47
|
|
|
|
|
|
|
* of segments. |
|
48
|
|
|
|
|
|
|
* |
|
49
|
|
|
|
|
|
|
* @version 1.7 |
|
50
|
|
|
|
|
|
|
*/ |
|
51
|
|
|
|
|
|
|
class GEOS_DLL SimpleNoder: public SinglePassNoder { |
|
52
|
|
|
|
|
|
|
private: |
|
53
|
|
|
|
|
|
|
std::vector* nodedSegStrings; |
|
54
|
|
|
|
|
|
|
virtual void computeIntersects(SegmentString *e0, SegmentString *e1); |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
public: |
|
57
|
1
|
|
|
|
|
|
SimpleNoder(SegmentIntersector* nSegInt=nullptr) |
|
58
|
|
|
|
|
|
|
: |
|
59
|
1
|
|
|
|
|
|
SinglePassNoder(nSegInt) |
|
60
|
1
|
|
|
|
|
|
{} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
void computeNodes(std::vector* inputSegmentStrings) override; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
std::vector* getNodedSubstrings() const override { |
|
65
|
|
|
|
|
|
|
return NodedSegmentString::getNodedSubstrings(*nodedSegStrings); |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
}; |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
} // namespace geos.noding |
|
70
|
|
|
|
|
|
|
} // namespace geos |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
#endif // GEOS_NODING_SIMPLENODER_H |