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