SnappingIntersectionAdder.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
*
* 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 <geos/algorithm/LineIntersector.h> // for composition
#include <geos/geom/Coordinate.h> // for use in vector
#include <geos/geom/PrecisionModel.h> // for inlines (should drop)
#include <geos/noding/SegmentIntersector.h>
// Forward declarations
namespace geos {
namespace geom {
class PrecisionModel;
}
namespace noding {
class SegmentString;
class NodedSegmentString;
namespace snap {
class SnappingPointIndex;
}
}
}
namespace geos {
namespace noding { // geos::noding
namespace snap { // geos::noding::snap
class GEOS_DLL SnappingIntersectionAdder: public SegmentIntersector { // implements SegmentIntersector
private:
algorithm::LineIntersector li;
double snapTolerance;
SnappingPointIndex& snapPointIndex;
void processNearVertex(
SegmentString* srcSS,
std::size_t srcIndex,
const geom::Coordinate& p,
SegmentString* ss,
std::size_t segIndex,
const geom::Coordinate& p0,
const geom::Coordinate& p1);
static bool isAdjacent(SegmentString* ss0, std::size_t segIndex0, SegmentString* ss1, std::size_t segIndex1);
public:
SnappingIntersectionAdder(double p_snapTolerance, SnappingPointIndex& p_snapPointIndex);
void processIntersections(SegmentString* e0, std::size_t segIndex0, SegmentString* e1, std::size_t segIndex1) override;
bool isDone() const override { return false; };
};
} // namespace geos::noding::snapround
} // namespace geos::noding
} // namespace geos
geos::geom::PrecisionModel
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:87
geos::noding::NodedSegmentString
Represents a list of contiguous line segments, and supports noding the segments.
Definition NodedSegmentString.h:58
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