20 #ifndef GEOS_ALGORITHM_CONSTRUCT_MAXIMUMCIRCLE_H
21 #define GEOS_ALGORITHM_CONSTRUCT_MAXIMUMCIRCLE_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;
115 std::unique_ptr<geom::Geometry> inputGeomBoundary;
126 double distanceToBoundary(
double x,
double y);
132 static constexpr
double SQRT2 = 1.4142135623730951;
140 Cell(
double p_x,
double p_y,
double p_hSize,
double p_distanceToBoundary)
144 , distance(p_distanceToBoundary)
145 , maxDist(p_distanceToBoundary+(p_hSize*SQRT2))
154 double getMaxDistance()
const
158 double getDistance()
const
162 double getHSize()
const
174 bool operator< (
const Cell& rhs)
const
176 return maxDist < rhs.maxDist;
178 bool operator> (
const Cell& rhs)
const
180 return maxDist > rhs.maxDist;
184 return maxDist == rhs.maxDist;
188 void createInitialGrid(
const geom::Envelope* env, std::priority_queue<Cell>& cellQueue);
189 Cell createCentroidCell(
const geom::Geometry* geom);
Definition: MaximumInscribedCircle.h:57
std::unique_ptr< geom::LineString > getRadiusLine()
static std::unique_ptr< geom::Point > getCenter(const geom::Geometry *polygonal, double tolerance)
static std::unique_ptr< geom::LineString > getRadiusLine(const geom::Geometry *polygonal, double tolerance)
std::unique_ptr< geom::Point > getCenter()
std::unique_ptr< geom::Point > getRadiusPoint()
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency.
Definition: IndexedPointInAreaLocator.h:55
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
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:68
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Definition: IndexedFacetDistance.h:47
bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26