20 #ifndef GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H 21 #define GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H 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> 39 class GeometryFactory;
97 static std::unique_ptr<geom::Point> getCenter(
const geom::Geometry* p_obstacles,
double p_tolerance);
107 static std::unique_ptr<geom::LineString> getRadiusLine(
const geom::Geometry* p_obstacles,
double p_tolerance);
109 std::unique_ptr<geom::Point> getCenter();
110 std::unique_ptr<geom::Point> getRadiusPoint();
111 std::unique_ptr<geom::LineString> getRadiusLine();
120 std::unique_ptr<geom::Geometry> boundary;
123 std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> ptLocator;
124 std::unique_ptr<operation::distance::IndexedFacetDistance> boundaryDistance;
142 double distanceToConstraints(
double x,
double y);
148 static constexpr
double SQRT2 = 1.4142135623730951;
156 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToConstraints)
160 , distance(p_distanceToConstraints)
161 , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
170 bool isFullyOutside()
const 172 return maxDist < 0.0;
174 bool isOutside()
const 176 return distance < 0.0;
178 double getMaxDistance()
const 182 double getDistance()
const 186 double getHSize()
const 198 bool operator< (
const Cell& rhs)
const 200 return maxDist < rhs.maxDist;
202 bool operator> (
const Cell& rhs)
const 204 return maxDist > rhs.maxDist;
206 bool operator==(
const Cell& rhs)
const 208 return maxDist == rhs.maxDist;
212 bool mayContainCircleCenter(
const Cell& cell,
const Cell& farthestCell);
213 void createInitialGrid(
const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
223 #endif // GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Definition: IndexedFacetDistance.h:47
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Definition: LargestEmptyCircle.h:75
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26