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

- File List

# QuadtreeNestedRingTester.h

    00001 /**********************************************************************
    00002  * $Id: QuadtreeNestedRingTester.h 3255 2011-03-01 17:56:10Z 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  * 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 #ifdef _MSC_VER
    00031 #pragma warning(push)
    00032 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
    00033 #endif
    00034
    00035 // Forward declarations
    00036 namespace geos {
    00037         namespace geom {
    00038                 class LinearRing;
    00039                 class Coordinate;
    00040         }
    00041         namespace index {
    00042                 namespace quadtree {
    00043                         class Quadtree;
    00044                 }
    00045         }
    00046         namespace geomgraph {
    00047                 class GeometryGraph;
    00048         }
    00049 }
    00050
    00051 namespace geos {
    00052 namespace operation { // geos::operation
    00053 namespace valid { // geos::operation::valid
    00054
    00061 class GEOS_DLL QuadtreeNestedRingTester {
    00062 public:
    00063
    00065         QuadtreeNestedRingTester(geomgraph::GeometryGraph* newGraph);
    00066
    00067         ~QuadtreeNestedRingTester();
    00068
    00069         /*
    00070          * Be aware that the returned Coordinate (if != NULL)
    00071          * will point to storage owned by one of the LinearRing
    00072          * previously added. If you destroy them, this
    00073          * will point to an invalid memory address.
    00074          */
    00075         geom::Coordinate* getNestedPoint();
    00076
    00077         void add(const geom::LinearRing* ring);
    00078
    00079         bool isNonNested();
    00080
    00081 private:
    00082
    00083         geomgraph::GeometryGraph* graph;  // used to find non-node vertices
    00084
    00085         std::vector<const geom::LinearRing*> rings;
    00086
    00087         geom::Envelope totalEnv;
    00088
    00089         index::quadtree::Quadtree* qt;
    00090
    00091         geom::Coordinate* nestedPt;
    00092
    00093         void buildQuadtree();
    00094 };
    00095
    00096 } // namespace geos::operation::valid
    00097 } // namespace geos::operation
    00098 } // namespace geos
    00099
    00100 #ifdef _MSC_VER
    00101 #pragma warning(pop)
    00102 #endif
    00103
    00104 #endif // GEOS_OP_QUADTREENESTEDRINGTESTER_H
    00105
    00106 /**********************************************************************
    00107  * $Log$
    00108  * Revision 1.2  2006/03/29 11:48:53  strk
    00109  * Removed useless heap allocations in construction, enforced const correctness
    00110  *
    00111  * Revision 1.1  2006/03/20 16:57:44  strk
    00112  * spatialindex.h and opValid.h headers split
    00113  *
    00114  **********************************************************************/
    00115