# SIRtreePointInRing.h

    00001 /**********************************************************************
    00002  * $Id: SIRtreePointInRing.h 1820 2006-09-06 16:54:23Z mloskot $
    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/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 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         bool isInside(const geom::Coordinate& pt);
    00053 };
    00054
    00055 } // namespace geos::algorithm
    00056 } // namespace geos
    00057
    00058
    00059 #endif // GEOS_ALGORITHM_SIRTREEPOINTINRING_H
    00060
    00061 /**********************************************************************
    00062  * $Log$
    00063  * Revision 1.2  2006/03/21 11:12:23  strk
    00064  * Cleanups: headers inclusion and Log section
    00065  *
    00066  * Revision 1.1  2006/03/09 16:46:48  strk
    00067  * geos::geom namespace definition, first pass at headers split
    00068  *
    00069  **********************************************************************/
    00070