23#include <geos/geom/Coordinate.h>
24#include <geos/geom/Point.h>
25#include <geos/geom/Envelope.h>
26#include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
27#include <geos/operation/distance/IndexedFacetDistance.h>
193 std::unique_ptr<geom::Geometry> inputGeomBoundary;
199 geom::CoordinateXY centerPt;
200 geom::CoordinateXY radiusPt;
201 double maximumRadius = -1;
204 static constexpr double MAX_RADIUS_FRACTION = 0.0001;
208 double distanceToBoundary(
double x,
double y);
210 void computeApproximation();
211 void createResult(
const geom::CoordinateXY& c,
const geom::CoordinateXY& r);
216 static constexpr double SQRT2 = 1.4142135623730951;
224 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToBoundary)
228 , distance(p_distanceToBoundary)
229 , maxDist(p_distanceToBoundary+(p_hSize*SQRT2))
238 double getMaxDistance()
const
242 double getDistance()
const
246 double getHSize()
const
259 bool operator< (
const Cell& rhs)
const
261 return maxDist < rhs.maxDist;
264 bool operator> (
const Cell& rhs)
const
266 return maxDist > rhs.maxDist;
269 bool operator==(
const Cell& rhs)
const
271 return maxDist == rhs.maxDist;
279 using CellQueue = std::priority_queue<Cell>;
282 void createInitialGrid(
const geom::Envelope* env, Cell::CellQueue& cellQueue);
283 Cell createInteriorPointCell(
const geom::Geometry* geom);
Definition MaximumInscribedCircle.h:90
std::unique_ptr< geom::Point > getCenter()
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *polygonal, double tolerance)
std::unique_ptr< geom::LineString > getRadiusLine()
static bool isRadiusWithin(const geom::Geometry *polygonal, double maxRadius)
static std::size_t computeMaximumIterations(const geom::Geometry *geom, double toleranceDist)
std::unique_ptr< geom::Point > getRadiusPoint()
bool isRadiusWithin(double maxRadius)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *polygonal, double tolerance)
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition IndexedPointInAreaLocator.h:54
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:196
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 geos.h:38