GEOS: TopologyValidationError.h Source File

GEOS 3.5.0

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

- File List

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