GEOS  3.13.0dev
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 #pragma once
21 
22 #include <geos/export.h>
23 #include <string>
24 
25 #include <geos/geom/Coordinate.h> // for composition
26 
27 // Forward declarations
28 // none required
29 
30 namespace geos {
31 namespace operation { // geos::operation
32 namespace valid { // geos::operation::valid
33 
39 class GEOS_DLL TopologyValidationError {
40 public:
41 
42  enum errorEnum {
43  eError,
44  eRepeatedPoint,
45  eHoleOutsideShell,
46  eNestedHoles,
47  eDisconnectedInterior,
48  eSelfIntersection,
49  eRingSelfIntersection,
50  eNestedShells,
51  eDuplicatedRings,
52  eTooFewPoints,
53  eInvalidCoordinate,
54  eRingNotClosed,
55  oNoInvalidIntersection = -1
56  };
57 
58  TopologyValidationError(int newErrorType, const geom::CoordinateXY& newPt);
59  TopologyValidationError(int newErrorType);
60  const geom::CoordinateXY& getCoordinate() const;
61  std::string getMessage() const;
62  int getErrorType() const;
63  std::string toString() const;
64 
65 private:
66  // Used const char* to reduce dynamic allocations
67  static const char* errMsg[];
68  int errorType;
69  const geom::CoordinateXY pt;
70 };
71 
72 
73 } // namespace geos.operation.valid
74 } // namespace geos.operation
75 } // namespace geos
76 
Contains information about the nature and location of a geom::Geometry validation error.
Definition: TopologyValidationError.h:39
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25