GEOS
3.6.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2005-2006 Refractions Research Inc. 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * 00009 * This is free software; you can redistribute and/or modify it under 00010 * the terms of the GNU Lesser General Public Licence as published 00011 * by the Free Software Foundation. 00012 * See the COPYING file for more information. 00013 * 00014 ********************************************************************** 00015 * 00016 * Last port: operation/valid/RepeatedPointTester.java rev. 1.8 (JTS-1.10) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_OP_REPEATEDPOINTTESTER_H 00021 #define GEOS_OP_REPEATEDPOINTTESTER_H 00022 00023 #include <geos/export.h> 00024 00025 #include <geos/geom/Coordinate.h> // for composition 00026 00027 // Forward declarations 00028 namespace geos { 00029 namespace geom { 00030 //class Coordinate; 00031 class CoordinateSequence; 00032 class Geometry; 00033 class Polygon; 00034 class MultiPolygon; 00035 class MultiLineString; 00036 class GeometryCollection; 00037 } 00038 } 00039 00040 namespace geos { 00041 namespace operation { // geos::operation 00042 namespace valid { // geos::operation::valid 00043 00049 class GEOS_DLL RepeatedPointTester { 00050 public: 00051 RepeatedPointTester() {} 00052 geom::Coordinate& getCoordinate(); 00053 bool hasRepeatedPoint(const geom::Geometry *g); 00054 bool hasRepeatedPoint(const geom::CoordinateSequence *coord); 00055 private: 00056 geom::Coordinate repeatedCoord; 00057 bool hasRepeatedPoint(const geom::Polygon *p); 00058 bool hasRepeatedPoint(const geom::GeometryCollection *gc); 00059 bool hasRepeatedPoint(const geom::MultiPolygon *gc); 00060 bool hasRepeatedPoint(const geom::MultiLineString *gc); 00061 }; 00062 00063 00064 } // namespace geos.operation.valid 00065 } // namespace geos.operation 00066 } // namespace geos 00067 00068 #endif // GEOS_OP_REPEATEDPOINTTESTER_H