GEOS  3.9.1dev
SimplePointInAreaLocator.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************/
15 
16 #ifndef GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
17 #define GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
18 
20 
21 // Forward declarations
22 namespace geos {
23 namespace geom {
24 class Geometry;
25 class Coordinate;
26 class Polygon;
27 }
28 }
29 
30 namespace geos {
31 namespace algorithm { // geos::algorithm
32 namespace locate { // geos::algorithm::locate
33 
48 
49 public:
50 
51  static geom::Location locate(const geom::Coordinate& p,
52  const geom::Geometry* geom);
53 
73  static geom::Location locatePointInPolygon(const geom::Coordinate& p,
74  const geom::Polygon* poly);
75 
88  static bool isContained(const geom::Coordinate& p,
89  const geom::Geometry* geom);
90 
92  : g(p_g)
93  { }
94 
96  locate(const geom::Coordinate* p) override
97  {
98  return locate(*p, g);
99  }
100 
101 private:
102 
103  static geom::Location locateInGeometry(const geom::Coordinate& p,
104  const geom::Geometry* geom);
105 
107 
108 };
109 
110 } // geos::algorithm::locate
111 } // geos::algorithm
112 } // geos
113 
114 
115 #endif // GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Computes the location of points relative to a polygonal Geometry, using a simple O(n) algorithm...
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:34
Basic namespace for all GEOS functionalities.
geom::Location locate(const geom::Coordinate *p) override