GEOS 3.6.2
SimplePointInAreaLocator.h
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
19#include <geos/algorithm/locate/PointOnGeometryLocator.h> // inherited
20
21// Forward declarations
22namespace geos {
23 namespace geom {
24 class Geometry;
25 class Coordinate;
26 class Polygon;
27 }
28}
29
30namespace geos {
31namespace algorithm { // geos::algorithm
32namespace locate { // geos::algorithm::locate
33
47class SimplePointInAreaLocator : public PointOnGeometryLocator
48{
49
50public:
51
52 static int locate(const geom::Coordinate& p,
53 const geom::Geometry *geom);
54
55 static bool containsPointInPolygon(const geom::Coordinate& p,
56 const geom::Polygon *poly);
57
58 SimplePointInAreaLocator( const geom::Geometry * g)
59 : g( g)
60 { }
61
62 int locate( const geom::Coordinate * p)
63 {
64 return locate( *p, g);
65 }
66
67private:
68
69 static bool containsPoint(const geom::Coordinate& p,
70 const geom::Geometry *geom);
71
72 const geom::Geometry * g;
73
74};
75
76} // geos::algorithm::locate
77} // geos::algorithm
78} // geos
79
80
81#endif // GEOS_ALGORITHM_LOCATE_SIMPLEPOINTINAREALOCATOR_H
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition PointOnGeometryLocator.h:36
int locate(const geom::Coordinate *p)
Definition SimplePointInAreaLocator.h:62
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Represents a linear polygon, which may include holes.
Definition Polygon.h:67
Classes which determine the Location of points in geometries.
Definition IndexedPointInAreaLocator.h:43
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:33
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25