00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H
00017 #define GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H
00018
00019 #include <geos/geom/Polygon.h>
00020
00021
00022 namespace geos {
00023 namespace geom {
00024 class Envelope;
00025
00026 }
00027 }
00028
00029 namespace geos {
00030 namespace operation {
00031 namespace predicate {
00032
00043 class RectangleIntersects {
00044
00045 private:
00046
00047 const geom::Polygon &rectangle;
00048
00049 const geom::Envelope &rectEnv;
00050
00051 public:
00052
00060 static const size_t MAXIMUM_SCAN_SEGMENT_COUNT;
00061
00067 RectangleIntersects(const geom::Polygon &newRect)
00068 :
00069 rectangle(newRect),
00070 rectEnv(*(newRect.getEnvelopeInternal()))
00071 {}
00072
00073 bool intersects(const geom::Geometry& geom);
00074
00075 static bool intersects(const geom::Polygon &rectangle,
00076 const geom::Geometry &b)
00077 {
00078 RectangleIntersects rp(rectangle);
00079 return rp.intersects(b);
00080 }
00081
00082 };
00083
00084
00085 }
00086 }
00087 }
00088
00089 #endif // ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H