GEOS
3.3.7
|
00001 /********************************************************************** 00002 * $Id: ConsistentAreaTester.h 2557 2009-06-08 09:30: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/ConsistentAreaTester.java rev. 1.14 (JTS-1.10) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_OP_CONSISTENTAREATESTER_H 00022 #define GEOS_OP_CONSISTENTAREATESTER_H 00023 00024 #include <geos/export.h> 00025 00026 #include <geos/geom/Coordinate.h> // for composition 00027 #include <geos/algorithm/LineIntersector.h> // for composition 00028 #include <geos/operation/relate/RelateNodeGraph.h> // for composition 00029 00030 // Forward declarations 00031 namespace geos { 00032 namespace algorithm { 00033 class LineIntersector; 00034 } 00035 namespace geomgraph { 00036 class GeometryGraph; 00037 } 00038 namespace operation { 00039 namespace relate { 00040 class RelateNodeGraph; 00041 } 00042 } 00043 } 00044 00045 namespace geos { 00046 namespace operation { // geos::operation 00047 namespace valid { // geos::operation::valid 00048 00084 class GEOS_DLL ConsistentAreaTester { 00085 private: 00086 00087 algorithm::LineIntersector li; 00088 00090 geomgraph::GeometryGraph *geomGraph; 00091 00092 relate::RelateNodeGraph nodeGraph; 00093 00095 geom::Coordinate invalidPoint; 00096 00101 bool isNodeEdgeAreaLabelsConsistent(); 00102 00103 public: 00104 00111 ConsistentAreaTester(geomgraph::GeometryGraph *newGeomGraph); 00112 00113 ~ConsistentAreaTester(); 00114 00119 geom::Coordinate& getInvalidPoint(); 00120 00128 bool isNodeConsistentArea(); 00129 00145 bool hasDuplicateRings(); 00146 }; 00147 00148 00149 00150 } // namespace geos::operation::valid 00151 } // namespace geos::operation 00152 } // namespace geos 00153 00154 #endif // GEOS_OP_CONSISTENTAREATESTER_H 00155 00156 /********************************************************************** 00157 * $Log$ 00158 * Revision 1.2 2006/03/27 10:37:58 strk 00159 * Reduced heap allocations and probability of error by making LineIntersector 00160 * and RelateNodeGraph part of ConsistentAreaTester class . 00161 * 00162 * Revision 1.1 2006/03/20 16:57:44 strk 00163 * spatialindex.h and opValid.h headers split 00164 * 00165 **********************************************************************/ 00166