22 #include <geos/geom/Coordinate.h>
23 #include <geos/geom/Point.h>
24 #include <geos/geom/Envelope.h>
25 #include <geos/algorithm/construct/IndexedDistanceToPoint.h>
26 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
27 #include <geos/operation/distance/IndexedFacetDistance.h>
37 class GeometryFactory;
129 std::unique_ptr<geom::Point> getCenter();
130 std::unique_ptr<geom::Point> getRadiusPoint();
131 std::unique_ptr<geom::LineString> getRadiusLine();
139 std::unique_ptr<geom::Geometry> boundary;
143 std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> boundaryPtLocater;
145 std::unique_ptr<IndexedFacetDistance> boundaryDistance;
146 geom::CoordinateXY centerPt;
147 geom::CoordinateXY radiusPt;
160 double distanceToConstraints(
double x,
double y);
167 static constexpr
double SQRT2 = 1.4142135623730951;
175 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToConstraints)
179 , distance(p_distanceToConstraints)
180 , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
189 bool isFullyOutside()
const
191 return maxDist < 0.0;
193 bool isOutside()
const
195 return distance < 0.0;
197 double getMaxDistance()
const
201 double getDistance()
const
205 double getHSize()
const
217 bool operator< (
const Cell& rhs)
const
219 return maxDist < rhs.maxDist;
221 bool operator> (
const Cell& rhs)
const
223 return maxDist > rhs.maxDist;
225 bool operator==(
const Cell& rhs)
const
227 return maxDist == rhs.maxDist;
231 bool mayContainCircleCenter(
const Cell& cell,
const Cell& farthestCell);
232 void createInitialGrid(
const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
233 Cell createCentroidCell(
const geom::Geometry* geom);
Computes the distance between a point and a geometry (which may be a collection containing any type o...
Definition: IndexedDistanceToPoint.h:45
Definition: LargestEmptyCircle.h:77
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *p_obstacles, double p_tolerance)
LargestEmptyCircle(const geom::Geometry *p_obstacles, const geom::Geometry *p_boundary, double p_tolerance)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *p_obstacles, double p_tolerance)
LargestEmptyCircle(const geom::Geometry *p_obstacles, double p_tolerance)
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:216
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
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