GEOS
3.4.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/TopologyValidationError.java rev. 1.16 (JTS-1.10) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_OP_TOPOLOGYVALIDATIONERROR_H 00021 #define GEOS_OP_TOPOLOGYVALIDATIONERROR_H 00022 00023 #include <geos/export.h> 00024 #include <string> 00025 00026 #include <geos/geom/Coordinate.h> // for composition 00027 00028 // Forward declarations 00029 // none required 00030 00031 namespace geos { 00032 namespace operation { // geos::operation 00033 namespace valid { // geos::operation::valid 00034 00040 class GEOS_DLL TopologyValidationError { 00041 public: 00042 00043 enum errorEnum { 00044 eError, 00045 eRepeatedPoint, 00046 eHoleOutsideShell, 00047 eNestedHoles, 00048 eDisconnectedInterior, 00049 eSelfIntersection, 00050 eRingSelfIntersection, 00051 eNestedShells, 00052 eDuplicatedRings, 00053 eTooFewPoints, 00054 eInvalidCoordinate, 00055 eRingNotClosed 00056 }; 00057 00058 TopologyValidationError(int newErrorType, const geom::Coordinate& newPt); 00059 TopologyValidationError(int newErrorType); 00060 geom::Coordinate& getCoordinate(); 00061 std::string getMessage(); 00062 int getErrorType(); 00063 std::string toString(); 00064 00065 private: 00066 // Used const char* to reduce dynamic allocations 00067 static const char* errMsg[]; 00068 int errorType; 00069 geom::Coordinate pt; 00070 }; 00071 00072 00073 } // namespace geos.operation.valid 00074 } // namespace geos.operation 00075 } // namespace geos 00076 00077 #endif // GEOS_OP_TOPOLOGYVALIDATIONERROR_H