GEOS
3.3.5
|
00001 /********************************************************************** 00002 * $Id: RepeatedPointTester.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/RepeatedPointTester.java rev. 1.8 (JTS-1.10) 00018 * 00019 **********************************************************************/ 00020 00021 #ifndef GEOS_OP_REPEATEDPOINTTESTER_H 00022 #define GEOS_OP_REPEATEDPOINTTESTER_H 00023 00024 #include <geos/export.h> 00025 00026 #include <geos/geom/Coordinate.h> // for composition 00027 00028 // Forward declarations 00029 namespace geos { 00030 namespace geom { 00031 //class Coordinate; 00032 class CoordinateSequence; 00033 class Geometry; 00034 class Polygon; 00035 class MultiPolygon; 00036 class MultiLineString; 00037 class GeometryCollection; 00038 } 00039 } 00040 00041 namespace geos { 00042 namespace operation { // geos::operation 00043 namespace valid { // geos::operation::valid 00044 00050 class GEOS_DLL RepeatedPointTester { 00051 public: 00052 RepeatedPointTester() {}; 00053 geom::Coordinate& getCoordinate(); 00054 bool hasRepeatedPoint(const geom::Geometry *g); 00055 bool hasRepeatedPoint(const geom::CoordinateSequence *coord); 00056 private: 00057 geom::Coordinate repeatedCoord; 00058 bool hasRepeatedPoint(const geom::Polygon *p); 00059 bool hasRepeatedPoint(const geom::GeometryCollection *gc); 00060 bool hasRepeatedPoint(const geom::MultiPolygon *gc); 00061 bool hasRepeatedPoint(const geom::MultiLineString *gc); 00062 }; 00063 00064 00065 } // namespace geos.operation.valid 00066 } // namespace geos.operation 00067 } // namespace geos 00068 00069 #endif // GEOS_OP_REPEATEDPOINTTESTER_H 00070 00071 /********************************************************************** 00072 * $Log$ 00073 * Revision 1.1 2006/03/20 16:57:44 strk 00074 * spatialindex.h and opValid.h headers split 00075 * 00076 **********************************************************************/ 00077