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 #ifdef _MSC_VER
00032 #pragma warning(push)
00033 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00034 #endif
00035
00036
00037 namespace geos {
00038 namespace geom {
00039 class Envelope;
00040 class LineSegment;
00041 }
00042 namespace simplify {
00043 class TaggedLineString;
00044 }
00045 namespace index {
00046 namespace quadtree {
00047 class Quadtree;
00048 }
00049 }
00050 }
00051
00052 namespace geos {
00053 namespace simplify {
00054
00055 class GEOS_DLL LineSegmentIndex {
00056
00057 public:
00058
00059 LineSegmentIndex();
00060
00061 ~LineSegmentIndex();
00062
00063 void add(const TaggedLineString& line);
00064
00065 void add(const geom::LineSegment* seg);
00066
00067 void remove(const geom::LineSegment* seg);
00068
00069 std::auto_ptr< std::vector<geom::LineSegment*> >
00070 query(const geom::LineSegment* seg) const;
00071
00072 private:
00073
00074 std::auto_ptr<index::quadtree::Quadtree> index;
00075
00076 std::vector<geom::Envelope*> newEnvelopes;
00077
00078
00079 LineSegmentIndex(const LineSegmentIndex&);
00080 LineSegmentIndex& operator=(const LineSegmentIndex&);
00081 };
00082
00083 }
00084 }
00085
00086 #ifdef _MSC_VER
00087 #pragma warning(pop)
00088 #endif
00089
00090 #endif // GEOS_SIMPLIFY_LINESEGMENTINDEX_H
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100