00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H
00021 #define GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H
00022
00023 #include <geos/export.h>
00024
00025 #include <geos/geom/Polygon.h>
00026
00027
00028 namespace geos {
00029 namespace geom {
00030 class Envelope;
00031
00032 }
00033 }
00034
00035 namespace geos {
00036 namespace operation {
00037 namespace predicate {
00038
00048 class GEOS_DLL RectangleIntersects {
00049
00050 private:
00051
00052 const geom::Polygon &rectangle;
00053
00054 const geom::Envelope &rectEnv;
00055
00056
00057 RectangleIntersects(const RectangleIntersects& other);
00058 RectangleIntersects& operator=(const RectangleIntersects& rhs);
00059
00060 public:
00061
00069 static const size_t MAXIMUM_SCAN_SEGMENT_COUNT;
00070
00076 RectangleIntersects(const geom::Polygon &newRect)
00077 :
00078 rectangle(newRect),
00079 rectEnv(*(newRect.getEnvelopeInternal()))
00080 {}
00081
00082 bool intersects(const geom::Geometry& geom);
00083
00084 static bool intersects(const geom::Polygon &rectangle,
00085 const geom::Geometry &b)
00086 {
00087 RectangleIntersects rp(rectangle);
00088 return rp.intersects(b);
00089 }
00090
00091 };
00092
00093
00094 }
00095 }
00096 }
00097
00098 #endif // ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H