17#include <geos/triangulate/tri/TriList.h>
18#include <geos/triangulate/tri/Tri.h>
93 template<
typename TriType>
100 static constexpr int FRAME_EXPAND_FACTOR = 4;
102 const Geometry* inputPolygons;
103 const GeometryFactory* geomFactory;
104 double maxEdgeLength;
105 double maxEdgeLengthRatio;
109 std::set<Tri*> hullTris;
110 std::deque<Tri*> borderTriQue;
111 std::vector<const LinearRing*> polygonRings;
112 TriList<Tri> triList;
118 std::map<Tri*, TriIndex> borderEdgeMap;
122 std::unique_ptr<Geometry> createEmptyHull();
124 void buildHullTris();
137 std::unique_ptr<Polygon> createFrame(
138 const Envelope* polygonsEnv);
140 double computeTargetEdgeLength(
141 TriList<Tri>& triList,
142 const CoordinateSequence* frameCorners,
143 double edgeLengthRatio)
const;
147 const CoordinateSequence* frameCorners)
const;
149 void removeFrameCornerTris(
151 const CoordinateSequence* frameCorners);
161 TriIndex vertexIndex(
163 const CoordinateSequence* pts)
const;
165 void removeBorderTris();
167 void removeHoleTris();
169 Tri* findHoleSeedTri()
const;
171 bool isHoleSeedTri(
const Tri* tri)
const;
173 bool isBorderTri(
const Tri* tri)
const;
175 bool isRemovable(
const Tri* tri)
const;
186 bool isTouchingSinglePolygon(
const Tri* tri)
const;
188 void addBorderTris(Tri* tri);
202 void addBorderTri(Tri* tri, TriIndex
index);
204 void removeBorderTri(Tri* tri);
206 bool hasAllVertices(
const LinearRing* ring,
const Tri* tri)
const;
208 bool hasVertex(
const LinearRing* ring,
const Coordinate& v)
const;
210 void envelope(
const Tri* tri, Envelope& env)
const;
212 std::unique_ptr<Geometry> createHullGeometry(
bool isIncludeInput);
225 static std::unique_ptr<Geometry>
240 static std::unique_ptr<Geometry>
242 const Geometry* polygons,
double maxLength,
243 bool isTight,
bool isHolesAllowed);
253 static std::unique_ptr<Geometry>
268 static std::unique_ptr<Geometry>
270 const Geometry* polygons,
double lengthRatio,
271 bool isTight,
bool isHolesAllowed);
281 static std::unique_ptr<Geometry>
292 static std::unique_ptr<Geometry>
void setTight(bool p_isTight)
std::unique_ptr< Geometry > getFill()
static std::unique_ptr< Geometry > concaveHullByLengthRatio(const Geometry *polygons, double lengthRatio, bool isTight, bool isHolesAllowed)
static std::unique_ptr< Geometry > concaveHullByLength(const Geometry *polygons, double maxLength, bool isTight, bool isHolesAllowed)
static std::unique_ptr< Geometry > concaveHullByLength(const Geometry *polygons, double maxLength)
static std::unique_ptr< Geometry > concaveHullByLengthRatio(const Geometry *polygons, double lengthRatio)
void setMaximumEdgeLength(double edgeLength)
static std::unique_ptr< Geometry > concaveFillByLengthRatio(const Geometry *polygons, double lengthRatio)
std::unique_ptr< Geometry > getHull()
ConcaveHullOfPolygons(const Geometry *geom)
void setHolesAllowed(bool p_isHolesAllowed)
void setMaximumEdgeLengthRatio(double edgeLengthRatio)
static std::unique_ptr< Geometry > concaveFillByLength(const Geometry *polygons, double maxLength)
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition Polygon.h:61
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:32
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
Classes to compute Delaunay triangulations.
Definition ConcaveHull.h:32
Basic namespace for all GEOS functionalities.
Definition geos.h:38