00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00017 #define GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00018
00019 #include <geos/export.h>
00020
00021 #include <vector>
00022
00023
00024 namespace geos {
00025 namespace index {
00026 namespace sweepline {
00027 class SweepLineInterval;
00028 class SweepLineEvent;
00029 class SweepLineOverlapAction;
00030 }
00031 }
00032 }
00033
00034 namespace geos {
00035 namespace index {
00036 namespace sweepline {
00037
00043 class GEOS_DLL SweepLineIndex {
00044
00045 public:
00046
00047 SweepLineIndex();
00048
00049 ~SweepLineIndex();
00050
00051 void add(SweepLineInterval *sweepInt);
00052
00053 void computeOverlaps(SweepLineOverlapAction *action);
00054
00055 private:
00056
00057
00058 std::vector<SweepLineEvent*> events;
00059
00060 bool indexBuilt;
00061
00062
00063 int nOverlaps;
00064
00070 void buildIndex();
00071
00072 void processOverlaps(int start, int end,
00073 SweepLineInterval *s0,
00074 SweepLineOverlapAction *action);
00075 };
00076
00077
00078 }
00079 }
00080 }
00081
00082 #endif // GEOS_INDEX_SWEEPLINE_SWEEPLINEINDEX_H
00083
00084
00085
00086
00087
00088
00089
00090