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;
128 std::unique_ptr<geom::Point> getCenter();
129 std::unique_ptr<geom::Point> getRadiusPoint();
130 std::unique_ptr<geom::LineString> getRadiusLine();
138 std::unique_ptr<geom::Geometry> boundary;
142 std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> boundaryPtLocater;
144 std::unique_ptr<IndexedFacetDistance> boundaryDistance;
145 geom::CoordinateXY centerPt;
146 geom::CoordinateXY radiusPt;
159 double distanceToConstraints(
double x,
double y);
166 static constexpr
double SQRT2 = 1.4142135623730951;
174 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToConstraints)
178 , distance(p_distanceToConstraints)
179 , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
188 bool isFullyOutside()
const
190 return maxDist < 0.0;
192 bool isOutside()
const
194 return distance < 0.0;
196 double getMaxDistance()
const
200 double getDistance()
const
204 double getHSize()
const
216 bool operator< (
const Cell& rhs)
const
218 return maxDist < rhs.maxDist;
220 bool operator> (
const Cell& rhs)
const
222 return maxDist > rhs.maxDist;
224 bool operator==(
const Cell& rhs)
const
226 return maxDist == rhs.maxDist;
230 bool mayContainCircleCenter(
const Cell& cell,
const Cell& farthestCell);
231 void createInitialGrid(
const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
232 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:41
Definition: LargestEmptyCircle.h:75
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: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