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

- File List

# TopologyValidationError.h

    00001 /**********************************************************************
    00002  * $Id: TopologyValidationError.h 2572 2009-06-08 22:10:55Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2005-2006 Refractions Research Inc.
    00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
    00009  *
    00010  * This is free software; you can redistribute and/or modify it under
    00011  * the terms of the GNU Lesser General Public Licence as published
    00012  * by the Free Software Foundation.
    00013  * See the COPYING file for more information.
    00014  *
    00015  **********************************************************************
    00016  *
    00017  * Last port: operation/valid/TopologyValidationError.java rev. 1.16 (JTS-1.10)
    00018  *
    00019  **********************************************************************/
    00020
    00021 #ifndef GEOS_OP_TOPOLOGYVALIDATIONERROR_H
    00022 #define GEOS_OP_TOPOLOGYVALIDATIONERROR_H
    00023
    00024 #include <geos/export.h>
    00025 #include <string>
    00026
    00027 #include <geos/geom/Coordinate.h> // for composition
    00028
    00029 // Forward declarations
    00030 // none required
    00031
    00032 namespace geos {
    00033 namespace operation { // geos::operation
    00034 namespace valid { // geos::operation::valid
    00035
    00041 class GEOS_DLL TopologyValidationError {
    00042 public:
    00043
    00044         enum errorEnum {
    00045                 eError,
    00046                 eRepeatedPoint,
    00047                 eHoleOutsideShell,
    00048                 eNestedHoles,
    00049                 eDisconnectedInterior,
    00050                 eSelfIntersection,
    00051                 eRingSelfIntersection,
    00052                 eNestedShells,
    00053                 eDuplicatedRings,
    00054                 eTooFewPoints,
    00055                 eInvalidCoordinate,
    00056                 eRingNotClosed
    00057         };
    00058
    00059         TopologyValidationError(int newErrorType, const geom::Coordinate& newPt);
    00060         TopologyValidationError(int newErrorType);
    00061         geom::Coordinate& getCoordinate();
    00062         std::string getMessage();
    00063         int getErrorType();
    00064         std::string toString();
    00065
    00066 private:
    00067         // Used const char* to reduce dynamic allocations
    00068         static const char* errMsg[];
    00069         int errorType;
    00070         geom::Coordinate pt;
    00071 };
    00072
    00073
    00074 } // namespace geos.operation.valid
    00075 } // namespace geos.operation
    00076 } // namespace geos
    00077
    00078 #endif // GEOS_OP_TOPOLOGYVALIDATIONERROR_H
    00079
    00080 /**********************************************************************
    00081  * $Log$
    00082  * Revision 1.1  2006/03/20 16:57:44  strk
    00083  * spatialindex.h and opValid.h headers split
    00084  *
    00085  **********************************************************************/
    00086