GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2005-2006 Refractions Research Inc. 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 **********************************************************************/ 00015 00016 #ifndef GEOS_ALGORITHM_SIRTREEPOINTINRING_H 00017 #define GEOS_ALGORITHM_SIRTREEPOINTINRING_H 00018 00019 #include <geos/export.h> 00020 #include <geos/algorithm/PointInRing.h> // for inheritance 00021 00022 #include <vector> 00023 00024 // Forward declarations 00025 namespace geos { 00026 namespace geom { 00027 class Coordinate; 00028 class LineSegment; 00029 class LinearRing; 00030 } 00031 namespace index { 00032 namespace strtree { 00033 class SIRtree; 00034 } 00035 } 00036 } 00037 00038 00039 namespace geos { 00040 namespace algorithm { // geos::algorithm 00041 00042 class GEOS_DLL SIRtreePointInRing: public PointInRing { 00043 private: 00044 geom::LinearRing *ring; 00045 index::strtree::SIRtree *sirTree; 00046 int crossings; // number of segment/ray crossings 00047 void buildIndex(); 00048 void testLineSegment(const geom::Coordinate& p, 00049 geom::LineSegment *seg); 00050 public: 00051 SIRtreePointInRing(geom::LinearRing *newRing); 00052 ~SIRtreePointInRing(); 00053 bool isInside(const geom::Coordinate& pt); 00054 }; 00055 00056 } // namespace geos::algorithm 00057 } // namespace geos 00058 00059 00060 #endif // GEOS_ALGORITHM_SIRTREEPOINTINRING_H 00061