00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _GEOS_SIMPLIFY_LINESEGMENTINDEX_H_
00025 #define _GEOS_SIMPLIFY_LINESEGMENTINDEX_H_
00026
00027 #include <vector>
00028 #include <memory>
00029
00030
00031 namespace geos {
00032 namespace geom {
00033 class Envelope;
00034 class LineSegment;
00035 }
00036 namespace simplify {
00037 class TaggedLineString;
00038 }
00039 namespace index {
00040 namespace quadtree {
00041 class Quadtree;
00042 }
00043 }
00044 }
00045
00046 namespace geos {
00047 namespace simplify {
00048
00049 class LineSegmentIndex {
00050
00051 public:
00052
00053 LineSegmentIndex();
00054
00055 ~LineSegmentIndex();
00056
00057 void add(const TaggedLineString& line);
00058
00059 void add(const geom::LineSegment* seg);
00060
00061 void remove(const geom::LineSegment* seg);
00062
00063 std::auto_ptr< std::vector<geom::LineSegment*> >
00064 query(const geom::LineSegment* seg) const;
00065
00066 private:
00067
00068 std::auto_ptr<index::quadtree::Quadtree> index;
00069
00070 std::vector<geom::Envelope*> newEnvelopes;
00071
00072
00073 LineSegmentIndex(const LineSegmentIndex&);
00074 LineSegmentIndex& operator=(const LineSegmentIndex&);
00075 };
00076
00077 }
00078 }
00079
00080 #endif // _GEOS_SIMPLIFY_LINESEGMENTINDEX_H_
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090