GEOS 3.6.2
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
25namespace 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
39namespace geos {
40namespace algorithm { // geos::algorithm
41
42class GEOS_DLL SIRtreePointInRing: public PointInRing {
43private:
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);
50public:
51 SIRtreePointInRing(geom::LinearRing *newRing);
52 ~SIRtreePointInRing();
53 bool isInside(const geom::Coordinate& pt);
54};
55
56} // namespace geos::algorithm
57} // namespace geos
58
59
60#endif // GEOS_ALGORITHM_SIRTREEPOINTINRING_H
61
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Definition LineSegment.h:57
Models an OGC SFS LinearRing.
Definition LinearRing.h:57
One-dimensional version of an STR-packed R-tree.
Definition SIRtree.h:41
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains 2-D and 1-D versions of the Sort-Tile-Recursive (STR) tree, a query-only R-tree.
Definition SIRtreePointInRing.h:32
Provides classes for various kinds of spatial indexes.
Definition IndexedNestedRingTester.h:31
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25