00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
00017 #define GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
00018
00019 #include <geos/algorithm/locate/PointOnGeometryLocator.h>
00020
00021
00022 namespace geos {
00023 namespace geom {
00024 class Geometry;
00025 class Coordinate;
00026 class Polygon;
00027 }
00028 }
00029
00030 namespace geos {
00031 namespace algorithm {
00032 namespace locate {
00033
00047 class SimplePointInAreaLocator : public PointOnGeometryLocator
00048 {
00049
00050 public:
00051
00052 static int locate(const geom::Coordinate& p,
00053 const geom::Geometry *geom);
00054
00055 static bool containsPointInPolygon(const geom::Coordinate& p,
00056 const geom::Polygon *poly);
00057
00058 SimplePointInAreaLocator( const geom::Geometry * g)
00059 : g( g)
00060 { }
00061
00062 int locate( const geom::Coordinate * p)
00063 {
00064 return locate( *p, g);
00065 }
00066
00067 private:
00068
00069 static bool containsPoint(const geom::Coordinate& p,
00070 const geom::Geometry *geom);
00071
00072 const geom::Geometry * g;
00073
00074 };
00075
00076 }
00077 }
00078 }
00079
00080
00081 #endif // GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H