GEOS: SweepLineIndex.h Source File

GEOS 3.3.8

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

- File List

SweepLineIndex.h
1 /**********************************************************************
2 * $Id: SweepLineIndex.h 3255 2011-03-01 17:56:10Z 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 Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************/
15
16 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
17 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
18
19 #include <geos/export.h>
20
21 #include <vector>
22
23 #ifdef _MSC_VER
24 #pragma warning(push)
25 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
26 #endif
27
28 // Forward declarations
29 namespace geos {
30 namespace index {
31 namespace sweepline {
32 class SweepLineInterval;
33 class SweepLineEvent;
34 class SweepLineOverlapAction;
35 }
36 }
37 }
38
39 namespace geos {
40 namespace index { // geos.index
41 namespace sweepline { // geos:index:sweepline
42
48 class GEOS_DLL SweepLineIndex {
49
50 public:
51
52 SweepLineIndex();
53
54 ~SweepLineIndex();
55
56 void add(SweepLineInterval *sweepInt);
57
58 void computeOverlaps(SweepLineOverlapAction *action);
59
60 private:
61
62 // FIXME: make it a real vector rather then a pointer
63 std::vector<SweepLineEvent*> events;
64
65 bool indexBuilt;
66
67 // statistics information
68 int nOverlaps;
69
75 void buildIndex();
76
77 void processOverlaps(int start, int end,
78 SweepLineInterval *s0,
79 SweepLineOverlapAction *action);
80 };
81
82 } // namespace geos:index:sweepline
83 } // namespace geos:index
84 } // namespace geos
85
86 #ifdef _MSC_VER
87 #pragma warning(pop)
88 #endif
89
90 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
91
92 /**********************************************************************
93 * $Log$
94 * Revision 1.1 2006/03/21 10:01:30 strk
95 * indexSweepline.h header split
96 *
97 **********************************************************************/
98