GEOS: MCIndexPointSnapper.h Source File

GEOS 3.5.0

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

- File List

MCIndexPointSnapper.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/snapround/MCIndexPointSnapper.java r486 (JTS-1.12+)
16 *
17 **********************************************************************/
18
19 #ifndef GEOS_NODING_SNAPROUND_MCINDEXPOINTSNAPPER_H
20 #define GEOS_NODING_SNAPROUND_MCINDEXPOINTSNAPPER_H
21
22 #include <geos/export.h>
23
24 #include <geos/inline.h>
25
26 // Forward declarations
27 namespace geos {
28 namespace index {
29 class SpatialIndex;
30 }
31 namespace noding {
32 class SegmentString;
33 namespace snapround {
34 class HotPixel;
35 }
36 }
37 }
38
39 namespace geos {
40 namespace noding { // geos::noding
41 namespace snapround { // geos::noding::snapround
42
48 class GEOS_DLL MCIndexPointSnapper {
49
50 public:
51
52
53 MCIndexPointSnapper(index::SpatialIndex& nIndex)
54 :
55 index(nIndex)
56 {}
57
70 bool snap(HotPixel& hotPixel, SegmentString* parentEdge,
71 unsigned int vertexIndex);
72
73 bool snap(HotPixel& hotPixel) {
74 return snap(hotPixel, 0, 0);
75 }
76
77
78 private:
79
80 index::SpatialIndex& index;
81
82 // Declare type as noncopyable
83 MCIndexPointSnapper(const MCIndexPointSnapper& other);
84 MCIndexPointSnapper& operator=(const MCIndexPointSnapper& rhs);
85 };
86
87
88 } // namespace geos::noding::snapround
89 } // namespace geos::noding
90 } // namespace geos
91
92 #endif // GEOS_NODING_SNAPROUND_MCINDEXPOINTSNAPPER_H
geos::noding::snapround::HotPixel
Implements a "hot pixel" as used in the Snap Rounding algorithm.
Definition: HotPixel.h:62
geos::noding::SegmentString
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:46
geos::index::SpatialIndex
Abstract class defines basic insertion and query operations supported by classes implementing spatial...
Definition: SpatialIndex.h:47
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
geos::noding::snapround::MCIndexPointSnapper
"Snaps" all SegmentStrings in a SpatialIndex containing MonotoneChains to a given HotPixel...
Definition: MCIndexPointSnapper.h:48