GEOS
3.3.8
|
00001 /********************************************************************** 00002 * $Id: SIRtreePointInRing.h 2556 2009-06-06 22:22:28Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2005-2006 Refractions Research Inc. 00008 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00009 * 00010 * This is free software; you can redistribute and/or modify it under 00011 * the terms of the GNU Lesser General Public Licence as published 00012 * by the Free Software Foundation. 00013 * See the COPYING file for more information. 00014 * 00015 **********************************************************************/ 00016 00017 #ifndef GEOS_ALGORITHM_SIRTREEPOINTINRING_H 00018 #define GEOS_ALGORITHM_SIRTREEPOINTINRING_H 00019 00020 #include <geos/export.h> 00021 #include <geos/algorithm/PointInRing.h> // for inheritance 00022 00023 #include <vector> 00024 00025 // Forward declarations 00026 namespace geos { 00027 namespace geom { 00028 class Coordinate; 00029 class LineSegment; 00030 class LinearRing; 00031 } 00032 namespace index { 00033 namespace strtree { 00034 class SIRtree; 00035 } 00036 } 00037 } 00038 00039 00040 namespace geos { 00041 namespace algorithm { // geos::algorithm 00042 00043 class GEOS_DLL SIRtreePointInRing: public PointInRing { 00044 private: 00045 geom::LinearRing *ring; 00046 index::strtree::SIRtree *sirTree; 00047 int crossings; // number of segment/ray crossings 00048 void buildIndex(); 00049 void testLineSegment(const geom::Coordinate& p, 00050 geom::LineSegment *seg); 00051 public: 00052 SIRtreePointInRing(geom::LinearRing *newRing); 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 00062 /********************************************************************** 00063 * $Log$ 00064 * Revision 1.2 2006/03/21 11:12:23 strk 00065 * Cleanups: headers inclusion and Log section 00066 * 00067 * Revision 1.1 2006/03/09 16:46:48 strk 00068 * geos::geom namespace definition, first pass at headers split 00069 * 00070 **********************************************************************/ 00071