22 #include <geos/geom/Coordinate.h>
23 #include <geos/geom/Point.h>
24 #include <geos/geom/Envelope.h>
25 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
26 #include <geos/operation/distance/IndexedFacetDistance.h>
38 class GeometryFactory;
129 std::unique_ptr<geom::Geometry> inputGeomBoundary;
135 geom::CoordinateXY centerPt;
136 geom::CoordinateXY radiusPt;
140 double distanceToBoundary(
double x,
double y);
146 static constexpr
double SQRT2 = 1.4142135623730951;
154 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToBoundary)
158 , distance(p_distanceToBoundary)
159 , maxDist(p_distanceToBoundary+(p_hSize*SQRT2))
168 double getMaxDistance()
const
172 double getDistance()
const
176 double getHSize()
const
189 bool operator< (
const Cell& rhs)
const
191 return maxDist < rhs.maxDist;
194 bool operator> (
const Cell& rhs)
const
196 return maxDist > rhs.maxDist;
199 bool operator==(
const Cell& rhs)
const
201 return maxDist == rhs.maxDist;
209 using CellQueue = std::priority_queue<Cell>;
212 void createInitialGrid(
const geom::Envelope* env, Cell::CellQueue& cellQueue);
213 Cell createInteriorPointCell(
const geom::Geometry* geom);
Definition: MaximumInscribedCircle.h:53
std::unique_ptr< geom::LineString > getRadiusLine()
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *polygonal, double tolerance)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *polygonal, double tolerance)
std::unique_ptr< geom::Point > getCenter()
std::unique_ptr< geom::Point > getRadiusPoint()
static std::size_t computeMaximumIterations(const geom::Geometry *geom, double toleranceDist)
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition: IndexedPointInAreaLocator.h:54
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
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:197
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Definition: IndexedFacetDistance.h:46
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25