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