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 public:
00057
00065 static const size_t MAXIMUM_SCAN_SEGMENT_COUNT;
00066
00072 RectangleIntersects(const geom::Polygon &newRect)
00073 :
00074 rectangle(newRect),
00075 rectEnv(*(newRect.getEnvelopeInternal()))
00076 {}
00077
00078 bool intersects(const geom::Geometry& geom);
00079
00080 static bool intersects(const geom::Polygon &rectangle,
00081 const geom::Geometry &b)
00082 {
00083 RectangleIntersects rp(rectangle);
00084 return rp.intersects(b);
00085 }
00086
00087 };
00088
00089
00090 }
00091 }
00092 }
00093
00094 #endif // ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H