GEOS: LineSegmentIndex.h Source File

GEOS 3.5.0

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

- File List

LineSegmentIndex.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 Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: simplify/LineSegmentIndex.java rev. 1.1 (JTS-1.7.1)
16 *
17 **********************************************************************
18 *
19 * NOTES
20 *
21 **********************************************************************/
22
23 #ifndef GEOS_SIMPLIFY_LINESEGMENTINDEX_H
24 #define GEOS_SIMPLIFY_LINESEGMENTINDEX_H
25
26 #include <geos/export.h>
27 #include <vector>
28 #include <memory> // for auto_ptr
29
30 #ifdef _MSC_VER
31 #pragma warning(push)
32 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
33 #endif
34
35 // Forward declarations
36 namespace geos {
37 namespace geom {
38 class Envelope;
39 class LineSegment;
40 }
41 namespace simplify {
42 class TaggedLineString;
43 }
44 namespace index {
45 namespace quadtree {
46 class Quadtree;
47 }
48 }
49 }
50
51 namespace geos {
52 namespace simplify { // geos::simplify
53
54 class GEOS_DLL LineSegmentIndex {
55
56 public:
57
58 LineSegmentIndex();
59
60 ~LineSegmentIndex();
61
62 void add(const TaggedLineString& line);
63
64 void add(const geom::LineSegment* seg);
65
66 void remove(const geom::LineSegment* seg);
67
68 std::auto_ptr< std::vector<geom::LineSegment*> >
69 query(const geom::LineSegment* seg) const;
70
71 private:
72
73 std::auto_ptr<index::quadtree::Quadtree> index;
74
75 std::vector<geom::Envelope*> newEnvelopes;
76
77 // Copying is turned off
78 LineSegmentIndex(const LineSegmentIndex&);
79 LineSegmentIndex& operator=(const LineSegmentIndex&);
80 };
81
82 } // namespace geos::simplify
83 } // namespace geos
84
85 #ifdef _MSC_VER
86 #pragma warning(pop)
87 #endif
88
89 #endif // GEOS_SIMPLIFY_LINESEGMENTINDEX_H
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25