20 #ifndef GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H 21 #define GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H 39 class GeometryFactory;
82 static std::unique_ptr<geom::Point> getCenter(
const geom::Geometry* p_obstacles,
double p_tolerance);
92 static std::unique_ptr<geom::LineString> getRadiusLine(
const geom::Geometry* p_obstacles,
double p_tolerance);
94 std::unique_ptr<geom::Point> getCenter();
95 std::unique_ptr<geom::Point> getRadiusPoint();
96 std::unique_ptr<geom::LineString> getRadiusLine();
108 std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator>
ptLocator;
127 double distanceToConstraints(
double x,
double y);
133 static constexpr
double SQRT2 = 1.4142135623730951;
141 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToConstraints)
145 , distance(p_distanceToConstraints)
146 , maxDist(p_distanceToConstraints + (p_hSize*SQRT2))
157 return maxDist < 0.0;
161 return distance < 0.0;
187 bool operator> (
const Cell& rhs)
const 197 bool mayContainCircleCenter(
const Cell& cell,
const Cell& farthestCell);
198 void createInitialGrid(
const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
208 #endif // GEOS_ALGORITHM_CONSTRUCT_LARGESTCIRCLE_H
An Envelope defines a rectangulare region of the 2D coordinate plane.
Cell(double p_x, double p_y, double p_hSize, double p_distanceToConstraints)
Coordinate is the lightweight class used to store coordinates.
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
double getDistance() const
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
bool operator<(const Coordinate &a, const Coordinate &b)
Strict weak ordering operator for Coordinate.
std::unique_ptr< algorithm::locate::IndexedPointInAreaLocator > ptLocator
std::unique_ptr< operation::distance::IndexedFacetDistance > boundaryDistance
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
const geom::Geometry * obstacles
bool operator==(const Cell &rhs) const
Basic namespace for all GEOS functionalities.
geom::Envelope getEnvelope() const
geom::Coordinate radiusPt
std::unique_ptr< geom::Geometry > boundary
geom::Coordinate centerPt
operation::distance::IndexedFacetDistance obstacleDistance
double getMaxDistance() const
bool isFullyOutside() const
const geom::GeometryFactory * factory