Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

NodingValidator.h

00001 /**********************************************************************
00002  * $Id: NodingValidator.h 2556 2009-06-06 22:22:28Z strk $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2006      Refractions Research 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 #ifndef GEOS_NODING_NODINGVALIDATOR_H
00017 #define GEOS_NODING_NODINGVALIDATOR_H
00018 
00019 #include <geos/export.h>
00020 
00021 #include <vector>
00022 #include <iostream>
00023 
00024 #include <geos/inline.h>
00025 
00026 #include <geos/algorithm/LineIntersector.h>
00027 //#include <geos/geom/Coordinate.h>
00028 
00029 // Forward declarations
00030 namespace geos {
00031         namespace geom {
00032                 class Coordinate;
00033         }
00034         namespace noding {
00035                 class SegmentString;
00036         }
00037 }
00038 
00039 namespace geos {
00040 namespace noding { // geos.noding
00041 
00049 class GEOS_DLL NodingValidator {
00050 private:
00051         algorithm::LineIntersector li;
00052         const std::vector<SegmentString*>& segStrings;
00053 
00058         void checkCollapses() const;
00059 
00060         void checkCollapses(const SegmentString& ss) const;
00061 
00062         void checkCollapse(const geom::Coordinate& p0, const geom::Coordinate& p1,
00063                         const geom::Coordinate& p2) const;
00064 
00069         void checkInteriorIntersections();
00070 
00071         void checkInteriorIntersections(const SegmentString& ss0,
00072                         const SegmentString& ss1);
00073 
00074         void checkInteriorIntersections(
00075                         const SegmentString& e0, unsigned int segIndex0,
00076                         const SegmentString& e1, unsigned int segIndex1);
00077 
00082         void checkEndPtVertexIntersections() const;
00083 
00084         void checkEndPtVertexIntersections(const geom::Coordinate& testPt,
00085                         const std::vector<SegmentString*>& segStrings) const;
00086 
00091         bool hasInteriorIntersection(const algorithm::LineIntersector& aLi,
00092                         const geom::Coordinate& p0, const geom::Coordinate& p1) const;
00093 
00094 public:
00095 
00096         NodingValidator(const std::vector<SegmentString*>& newSegStrings):
00097                 segStrings(newSegStrings)
00098         {}
00099 
00100         ~NodingValidator() {}
00101 
00102         void checkValid();
00103 
00104 };
00105 
00106 
00107 } // namespace geos.noding
00108 } // namespace geos
00109 
00110 //#ifdef GEOS_INLINE
00111 //# include "geos/noding/NodingValidator.inl"
00112 //#endif
00113 
00114 #endif // GEOS_NODING_NODINGVALIDATOR_H
00115 
00116 /**********************************************************************
00117  * $Log$
00118  * Revision 1.2  2006/03/24 09:52:41  strk
00119  * USE_INLINE => GEOS_INLINE
00120  *
00121  * Revision 1.1  2006/03/09 16:46:49  strk
00122  * geos::geom namespace definition, first pass at headers split
00123  *
00124  **********************************************************************/
00125 

Generated on Thu Jun 11 06:17:01 2009 for GEOS by  doxygen 1.4.4