• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

NodingValidator.h

00001 /**********************************************************************
00002  * $Id: NodingValidator.h 2778 2009-12-03 19:44:00Z mloskot $
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     // Declare type as noncopyable
00095     NodingValidator(const NodingValidator& other);
00096     NodingValidator& operator=(const NodingValidator& rhs);
00097 
00098 public:
00099 
00100         NodingValidator(const std::vector<SegmentString*>& newSegStrings):
00101                 segStrings(newSegStrings)
00102         {}
00103 
00104         ~NodingValidator() {}
00105 
00106         void checkValid();
00107 
00108 };
00109 
00110 
00111 } // namespace geos.noding
00112 } // namespace geos
00113 
00114 //#ifdef GEOS_INLINE
00115 //# include "geos/noding/NodingValidator.inl"
00116 //#endif
00117 
00118 #endif // GEOS_NODING_NODINGVALIDATOR_H
00119 
00120 /**********************************************************************
00121  * $Log$
00122  * Revision 1.2  2006/03/24 09:52:41  strk
00123  * USE_INLINE => GEOS_INLINE
00124  *
00125  * Revision 1.1  2006/03/09 16:46:49  strk
00126  * geos::geom namespace definition, first pass at headers split
00127  *
00128  **********************************************************************/
00129 

Generated on Thu Jul 22 2010 for GEOS by  doxygen 1.7.1