• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

SimplePointInAreaLocator.h

00001 /**********************************************************************
00002  * $Id: SimplePointInAreaLocator.h 2120 2008-01-30 22:34:13Z benjubb $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2005-2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
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> // inherited
00021 
00022 // Forward declarations
00023 namespace geos {
00024         namespace geom {
00025                 class Geometry;
00026                 class Coordinate;
00027                 class Polygon;
00028         }
00029 }
00030 
00031 namespace geos {
00032 namespace algorithm { // geos::algorithm
00033 namespace locate { // geos::algorithm::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 } // geos::algorithm::locate
00078 } // geos::algorithm
00079 } // geos
00080 
00081 
00082 #endif // GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
00083 
00084 /**********************************************************************
00085  * $Log$
00086  * Revision 1.1  2006/03/09 16:46:48  strk
00087  * geos::geom namespace definition, first pass at headers split
00088  *
00089  **********************************************************************/
00090 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1