DelaunayTriangulationBuilder.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2012 Excensus LLC.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: triangulate/DelaunayTriangulationBuilder.java r524
*
**********************************************************************/
#pragma once
#include <geos/triangulate/IncrementalDelaunayTriangulator.h>
#include <geos/geom/CoordinateSequence.h>
#include <memory>
namespace geos {
namespace geom {
class Geometry;
class MultiLineString;
class GeometryCollection;
class GeometryFactory;
class Envelope;
}
namespace triangulate {
namespace quadedge {
class QuadEdgeSubdivision;
}
}
}
namespace geos {
namespace triangulate { //geos.triangulate
class GEOS_DLL DelaunayTriangulationBuilder {
public:
static std::unique_ptr<geom::CoordinateSequence> extractUniqueCoordinates(const geom::Geometry& geom);
static IncrementalDelaunayTriangulator::VertexList toVertices(const geom::CoordinateSequence& coords);
static std::unique_ptr<geom::CoordinateSequence> unique(const geom::CoordinateSequence* seq);
private:
std::unique_ptr<geom::CoordinateSequence> siteCoords;
double tolerance;
std::unique_ptr<quadedge::QuadEdgeSubdivision> subdiv;
public:
DelaunayTriangulationBuilder();
~DelaunayTriangulationBuilder() = default;
void setSites(const geom::Geometry& geom);
void setSites(const geom::CoordinateSequence& coords);
inline void
setTolerance(double p_tolerance)
{
this->tolerance = p_tolerance;
}
private:
void create();
public:
quadedge::QuadEdgeSubdivision& getSubdivision();
std::unique_ptr<geom::MultiLineString> getEdges(const geom::GeometryFactory& geomFact);
std::unique_ptr<geom::GeometryCollection> getTriangles(const geom::GeometryFactory& geomFact);
static geom::Envelope envelope(const geom::CoordinateSequence& coords);
};
} //namespace geos.triangulate
} //namespace goes
geos::geom::CoordinateSequence
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
geos::geom::GeometryCollection
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
geos::geom::GeometryFactory
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::geom::MultiLineString
Models a collection of LineStrings.
Definition MultiLineString.h:49
geos::triangulate::DelaunayTriangulationBuilder::DelaunayTriangulationBuilder
DelaunayTriangulationBuilder()
geos::triangulate::DelaunayTriangulationBuilder::unique
static std::unique_ptr< geom::CoordinateSequence > unique(const geom::CoordinateSequence *seq)
geos::triangulate::DelaunayTriangulationBuilder::getSubdivision
quadedge::QuadEdgeSubdivision & getSubdivision()
geos::triangulate::DelaunayTriangulationBuilder::extractUniqueCoordinates
static std::unique_ptr< geom::CoordinateSequence > extractUniqueCoordinates(const geom::Geometry &geom)
geos::triangulate::DelaunayTriangulationBuilder::toVertices
static IncrementalDelaunayTriangulator::VertexList toVertices(const geom::CoordinateSequence &coords)
geos::triangulate::DelaunayTriangulationBuilder::getEdges
std::unique_ptr< geom::MultiLineString > getEdges(const geom::GeometryFactory &geomFact)
geos::triangulate::DelaunayTriangulationBuilder::setSites
void setSites(const geom::CoordinateSequence &coords)
geos::triangulate::DelaunayTriangulationBuilder::getTriangles
std::unique_ptr< geom::GeometryCollection > getTriangles(const geom::GeometryFactory &geomFact)
geos::triangulate::DelaunayTriangulationBuilder::envelope
static geom::Envelope envelope(const geom::CoordinateSequence &coords)
geos::triangulate::DelaunayTriangulationBuilder::setSites
void setSites(const geom::Geometry &geom)
geos::triangulate::DelaunayTriangulationBuilder::setTolerance
void setTolerance(double p_tolerance)
Definition DelaunayTriangulationBuilder.h:119
geos::triangulate::quadedge::QuadEdgeSubdivision
A class that contains the QuadEdges representing a planar subdivision that models a triangulation.
Definition QuadEdgeSubdivision.h:78
geos::geom
Definition Angle.h:26
geos::triangulate::quadedge
Classes to implement a topological subdivision of quadeges, to support creating triangulations and Vo...
Definition ConcaveHull.h:33
geos::triangulate
Classes to compute Delaunay triangulations.
Definition ConcaveHull.h:32
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38