GEOS 3.4.2

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

SIRtreePointInRing.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_SIRTREEPOINTINRING_H
17 #define GEOS_ALGORITHM_SIRTREEPOINTINRING_H
18
19 #include <geos/export.h>
20 #include <geos/algorithm/PointInRing.h> // for inheritance
21
22 #include <vector>
23
24 // Forward declarations
25 namespace geos {
26 namespace geom {
27 class Coordinate;
28 class LineSegment;
29 class LinearRing;
30 }
31 namespace index {
32 namespace strtree {
33 class SIRtree;
34 }
35 }
36 }
37
38
39 namespace geos {
40 namespace algorithm { // geos::algorithm
41
42 class GEOS_DLL SIRtreePointInRing: public PointInRing {
43 private:
44 geom::LinearRing *ring;
45 index::strtree::SIRtree *sirTree;
46 int crossings; // number of segment/ray crossings
47 void buildIndex();
48 void testLineSegment(const geom::Coordinate& p,
49 geom::LineSegment *seg);
50 public:
51 SIRtreePointInRing(geom::LinearRing *newRing);
52 bool isInside(const geom::Coordinate& pt);
53 };
54
55 } // namespace geos::algorithm
56 } // namespace geos
57
58
59 #endif // GEOS_ALGORITHM_SIRTREEPOINTINRING_H
60