NodingValidator.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <vector>
#include <iostream>
#include <geos/algorithm/LineIntersector.h>
//#include <geos/geom/Coordinate.h>
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
}
namespace noding {
class SegmentString;
}
}
namespace geos {
namespace noding { // geos.noding
class GEOS_DLL NodingValidator {
private:
algorithm::LineIntersector li;
const std::vector<SegmentString*>& segStrings;
void checkCollapses() const;
void checkCollapses(const SegmentString& ss) const;
void checkCollapse(const geom::Coordinate& p0, const geom::Coordinate& p1,
const geom::Coordinate& p2) const;
void checkInteriorIntersections();
void checkInteriorIntersections(const SegmentString& ss0,
const SegmentString& ss1);
void checkInteriorIntersections(
const SegmentString& e0, std::size_t segIndex0,
const SegmentString& e1, std::size_t segIndex1);
void checkEndPtVertexIntersections() const;
void checkEndPtVertexIntersections(const geom::Coordinate& testPt,
const std::vector<SegmentString*>& segStrings) const;
bool hasInteriorIntersection(const algorithm::LineIntersector& aLi,
const geom::Coordinate& p0, const geom::Coordinate& p1) const;
// Declare type as noncopyable
NodingValidator(const NodingValidator& other) = delete;
NodingValidator& operator=(const NodingValidator& rhs) = delete;
public:
NodingValidator(const std::vector<SegmentString*>& newSegStrings):
segStrings(newSegStrings)
{}
~NodingValidator() {}
void checkValid();
};
} // namespace geos.noding
} // namespace geos
geos::algorithm::LineIntersector
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition LineIntersector.h:53
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::noding::SegmentString
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
geos::geom
Definition Angle.h:26
geos::noding
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition CoverageCleaner.h:42
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38