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 <geos/export.h>
00028 #include <vector>
00029 #include <memory>
00030
00031
00032 namespace geos {
00033 namespace geom {
00034 class Envelope;
00035 class LineSegment;
00036 }
00037 namespace simplify {
00038 class TaggedLineString;
00039 }
00040 namespace index {
00041 namespace quadtree {
00042 class Quadtree;
00043 }
00044 }
00045 }
00046
00047 namespace geos {
00048 namespace simplify {
00049
00050 class GEOS_DLL LineSegmentIndex {
00051
00052 public:
00053
00054 LineSegmentIndex();
00055
00056 ~LineSegmentIndex();
00057
00058 void add(const TaggedLineString& line);
00059
00060 void add(const geom::LineSegment* seg);
00061
00062 void remove(const geom::LineSegment* seg);
00063
00064 std::auto_ptr< std::vector<geom::LineSegment*> >
00065 query(const geom::LineSegment* seg) const;
00066
00067 private:
00068
00069 std::auto_ptr<index::quadtree::Quadtree> index;
00070
00071 std::vector<geom::Envelope*> newEnvelopes;
00072
00073
00074 LineSegmentIndex(const LineSegmentIndex&);
00075 LineSegmentIndex& operator=(const LineSegmentIndex&);
00076 };
00077
00078 }
00079 }
00080
00081 #endif // GEOS_SIMPLIFY_LINESEGMENTINDEX_H
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091