GEOS 3.3.8

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

- File List

LineSegmentIndex.h
1 /**********************************************************************
2 * $Id: LineSegmentIndex.h 2958 2010-03-29 11:29:40Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2006 Refractions Research Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: simplify/LineSegmentIndex.java rev. 1.1 (JTS-1.7.1)
17 *
18 **********************************************************************
19 *
20 * NOTES
21 *
22 **********************************************************************/
23
24 #ifndef GEOS_SIMPLIFY_LINESEGMENTINDEX_H
25 #define GEOS_SIMPLIFY_LINESEGMENTINDEX_H
26
27 #include <geos/export.h>
28 #include <vector>
29 #include <memory> // for auto_ptr
30
31 #ifdef _MSC_VER
32 #pragma warning(push)
33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
34 #endif
35
36 // Forward declarations
37 namespace geos {
38 namespace geom {
39 class Envelope;
40 class LineSegment;
41 }
42 namespace simplify {
43 class TaggedLineString;
44 }
45 namespace index {
46 namespace quadtree {
47 class Quadtree;
48 }
49 }
50 }
51
52 namespace geos {
53 namespace simplify { // geos::simplify
54
55 class GEOS_DLL LineSegmentIndex {
56
57 public:
58
59 LineSegmentIndex();
60
61 ~LineSegmentIndex();
62
63 void add(const TaggedLineString& line);
64
65 void add(const geom::LineSegment* seg);
66
67 void remove(const geom::LineSegment* seg);
68
69 std::auto_ptr< std::vector<geom::LineSegment*> >
70 query(const geom::LineSegment* seg) const;
71
72 private:
73
74 std::auto_ptr<index::quadtree::Quadtree> index;
75
76 std::vector<geom::Envelope*> newEnvelopes;
77
78 // Copying is turned off
79 LineSegmentIndex(const LineSegmentIndex&);
80 LineSegmentIndex& operator=(const LineSegmentIndex&);
81 };
82
83 } // namespace geos::simplify
84 } // namespace geos
85
86 #ifdef _MSC_VER
87 #pragma warning(pop)
88 #endif
89
90 #endif // GEOS_SIMPLIFY_LINESEGMENTINDEX_H
91
92 /**********************************************************************
93 * $Log$
94 * Revision 1.2 2006/04/13 09:28:09 mloskot
95 * Removed definition of copy ctor and assignment operator for LineSegmentString class.
96 *
97 * Revision 1.1 2006/04/12 15:20:37 strk
98 * LineSegmentIndex class
99 *
100 **********************************************************************/