GEOS 3.3.4

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

- File List

TopologyValidationError.h
1 /**********************************************************************
2 * $Id: TopologyValidationError.h 2572 2009-06-08 22:10:55Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: operation/valid/TopologyValidationError.java rev. 1.16 (JTS-1.10)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_OP_TOPOLOGYVALIDATIONERROR_H
22 #define GEOS_OP_TOPOLOGYVALIDATIONERROR_H
23
24 #include <geos/export.h>
25 #include <string>
26
27 #include <geos/geom/Coordinate.h> // for composition
28
29 // Forward declarations
30 // none required
31
32 namespace geos {
33 namespace operation { // geos::operation
34 namespace valid { // geos::operation::valid
35
41 class GEOS_DLL TopologyValidationError {
42 public:
43
44 enum errorEnum {
45 eError,
46 eRepeatedPoint,
47 eHoleOutsideShell,
48 eNestedHoles,
49 eDisconnectedInterior,
50 eSelfIntersection,
51 eRingSelfIntersection,
52 eNestedShells,
53 eDuplicatedRings,
54 eTooFewPoints,
55 eInvalidCoordinate,
56 eRingNotClosed
57 };
58
59 TopologyValidationError(int newErrorType, const geom::Coordinate& newPt);
60 TopologyValidationError(int newErrorType);
61 geom::Coordinate& getCoordinate();
62 std::string getMessage();
63 int getErrorType();
64 std::string toString();
65
66 private:
67 // Used const char* to reduce dynamic allocations
68 static const char* errMsg[];
69 int errorType;
70 geom::Coordinate pt;
71 };
72
73
74 } // namespace geos.operation.valid
75 } // namespace geos.operation
76 } // namespace geos
77
78 #endif // GEOS_OP_TOPOLOGYVALIDATIONERROR_H
79
80 /**********************************************************************
81 * $Log$
82 * Revision 1.1 2006/03/20 16:57:44 strk
83 * spatialindex.h and opValid.h headers split
84 *
85 **********************************************************************/
86