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