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

- File List

# QuadtreeNestedRingTester.h

    00001 /**********************************************************************
    00002  * $Id: QuadtreeNestedRingTester.h 2572 2009-06-08 22:10:55Z 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  * Last port: operation/valid/QuadtreeNestedRingTester.java rev. 1.12 (JTS-1.10)
    00018  *
    00019  **********************************************************************/
    00020
    00021 #ifndef GEOS_OP_QUADTREENESTEDRINGTESTER_H
    00022 #define GEOS_OP_QUADTREENESTEDRINGTESTER_H
    00023
    00024 #include <geos/export.h>
    00025
    00026 #include <geos/geom/Envelope.h> // for composition
    00027
    00028 #include <vector>
    00029
    00030 // Forward declarations
    00031 namespace geos {
    00032         namespace geom {
    00033                 class LinearRing;
    00034                 class Coordinate;
    00035         }
    00036         namespace index {
    00037                 namespace quadtree {
    00038                         class Quadtree;
    00039                 }
    00040         }
    00041         namespace geomgraph {
    00042                 class GeometryGraph;
    00043         }
    00044 }
    00045
    00046 namespace geos {
    00047 namespace operation { // geos::operation
    00048 namespace valid { // geos::operation::valid
    00049
    00056 class GEOS_DLL QuadtreeNestedRingTester {
    00057 public:
    00058
    00060         QuadtreeNestedRingTester(geomgraph::GeometryGraph* newGraph);
    00061
    00062         ~QuadtreeNestedRingTester();
    00063
    00064         /*
    00065          * Be aware that the returned Coordinate (if != NULL)
    00066          * will point to storage owned by one of the LinearRing
    00067          * previously added. If you destroy them, this
    00068          * will point to an invalid memory address.
    00069          */
    00070         geom::Coordinate* getNestedPoint();
    00071
    00072         void add(const geom::LinearRing* ring);
    00073
    00074         bool isNonNested();
    00075
    00076 private:
    00077
    00078         geomgraph::GeometryGraph* graph;  // used to find non-node vertices
    00079
    00080         std::vector<const geom::LinearRing*> rings;
    00081
    00082         geom::Envelope totalEnv;
    00083
    00084         index::quadtree::Quadtree* qt;
    00085
    00086         geom::Coordinate* nestedPt;
    00087
    00088         void buildQuadtree();
    00089 };
    00090
    00091 } // namespace geos::operation::valid
    00092 } // namespace geos::operation
    00093 } // namespace geos
    00094
    00095 #endif // GEOS_OP_QUADTREENESTEDRINGTESTER_H
    00096
    00097 /**********************************************************************
    00098  * $Log$
    00099  * Revision 1.2  2006/03/29 11:48:53  strk
    00100  * Removed useless heap allocations in construction, enforced const correctness
    00101  *
    00102  * Revision 1.1  2006/03/20 16:57:44  strk
    00103  * spatialindex.h and opValid.h headers split
    00104  *
    00105  **********************************************************************/
    00106