GEOS  3.9.1dev
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
geos::algorithm::construct::MaximumInscribedCircle Class Reference

#include <MaximumInscribedCircle.h>

Collaboration diagram for geos::algorithm::construct::MaximumInscribedCircle:
[legend]

Classes

class  Cell
 

Public Member Functions

 MaximumInscribedCircle (const geom::Geometry *polygonal, double tolerance)
 
 ~MaximumInscribedCircle ()=default
 
std::unique_ptr< geom::PointgetCenter ()
 
std::unique_ptr< geom::PointgetRadiusPoint ()
 
std::unique_ptr< geom::LineStringgetRadiusLine ()
 

Static Public Member Functions

static std::unique_ptr< geom::PointgetCenter (const geom::Geometry *polygonal, double tolerance)
 
static std::unique_ptr< geom::LineStringgetRadiusLine (const geom::Geometry *polygonal, double tolerance)
 

Private Member Functions

double distanceToBoundary (const geom::Coordinate &c)
 
double distanceToBoundary (double x, double y)
 
void compute ()
 
void createInitialGrid (const geom::Envelope *env, std::priority_queue< Cell > &cellQueue)
 
Cell createCentroidCell (const geom::Geometry *geom)
 

Private Attributes

const geom::GeometryinputGeom
 
std::unique_ptr< geom::GeometryinputGeomBoundary
 
double tolerance
 
IndexedFacetDistance indexedDistance
 
IndexedPointInAreaLocator ptLocator
 
const geom::GeometryFactoryfactory
 
bool done
 
geom::Coordinate centerPt
 
geom::Coordinate radiusPt
 

Detailed Description

Computes the Euclidean distance (L2 metric) from a Point to a Geometry.

Also computes two points which are separated by the distance.

Definition at line 57 of file MaximumInscribedCircle.h.

Constructor & Destructor Documentation

geos::algorithm::construct::MaximumInscribedCircle::MaximumInscribedCircle ( const geom::Geometry polygonal,
double  tolerance 
)
geos::algorithm::construct::MaximumInscribedCircle::~MaximumInscribedCircle ( )
default

Member Function Documentation

void geos::algorithm::construct::MaximumInscribedCircle::compute ( )
private
Cell geos::algorithm::construct::MaximumInscribedCircle::createCentroidCell ( const geom::Geometry geom)
private
void geos::algorithm::construct::MaximumInscribedCircle::createInitialGrid ( const geom::Envelope env,
std::priority_queue< Cell > &  cellQueue 
)
private
double geos::algorithm::construct::MaximumInscribedCircle::distanceToBoundary ( const geom::Coordinate c)
private
double geos::algorithm::construct::MaximumInscribedCircle::distanceToBoundary ( double  x,
double  y 
)
private
std::unique_ptr<geom::Point> geos::algorithm::construct::MaximumInscribedCircle::getCenter ( )

Gets the center point of the maximum inscribed circle (up to the tolerance distance).

Returns
the center point of the maximum inscribed circle
static std::unique_ptr<geom::Point> geos::algorithm::construct::MaximumInscribedCircle::getCenter ( const geom::Geometry polygonal,
double  tolerance 
)
static

Computes the center point of the Maximum Inscribed Circle of a polygonal geometry, up to a given tolerance distance.

Parameters
polygonala polygonal geometry
tolerancethe distance tolerance for computing the center point
Returns
the center point of the maximum inscribed circle
std::unique_ptr<geom::LineString> geos::algorithm::construct::MaximumInscribedCircle::getRadiusLine ( )

Gets a line representing a radius of the Largest Empty Circle.

Returns
a line from the center of the circle to a point on the edge
static std::unique_ptr<geom::LineString> geos::algorithm::construct::MaximumInscribedCircle::getRadiusLine ( const geom::Geometry polygonal,
double  tolerance 
)
static

Computes a radius line of the Maximum Inscribed Circle of a polygonal geometry, up to a given tolerance distance.

Parameters
polygonala polygonal geometry
tolerancethe distance tolerance for computing the center point
Returns
a line from the center to a point on the circle
std::unique_ptr<geom::Point> geos::algorithm::construct::MaximumInscribedCircle::getRadiusPoint ( )

Gets a point defining the radius of the Maximum Inscribed Circle. This is a point on the boundary which is nearest to the computed center of the Maximum Inscribed Circle. The line segment from the center to this point is a radius of the constructed circle, and this point lies on the boundary of the circle.

Returns
a point defining the radius of the Maximum Inscribed Circle

Member Data Documentation

geom::Coordinate geos::algorithm::construct::MaximumInscribedCircle::centerPt
private

Definition at line 121 of file MaximumInscribedCircle.h.

bool geos::algorithm::construct::MaximumInscribedCircle::done
private

Definition at line 120 of file MaximumInscribedCircle.h.

const geom::GeometryFactory* geos::algorithm::construct::MaximumInscribedCircle::factory
private

Definition at line 119 of file MaximumInscribedCircle.h.

IndexedFacetDistance geos::algorithm::construct::MaximumInscribedCircle::indexedDistance
private

Definition at line 117 of file MaximumInscribedCircle.h.

const geom::Geometry* geos::algorithm::construct::MaximumInscribedCircle::inputGeom
private

Definition at line 114 of file MaximumInscribedCircle.h.

std::unique_ptr<geom::Geometry> geos::algorithm::construct::MaximumInscribedCircle::inputGeomBoundary
private

Definition at line 115 of file MaximumInscribedCircle.h.

IndexedPointInAreaLocator geos::algorithm::construct::MaximumInscribedCircle::ptLocator
private

Definition at line 118 of file MaximumInscribedCircle.h.

geom::Coordinate geos::algorithm::construct::MaximumInscribedCircle::radiusPt
private

Definition at line 122 of file MaximumInscribedCircle.h.

double geos::algorithm::construct::MaximumInscribedCircle::tolerance
private

Definition at line 116 of file MaximumInscribedCircle.h.


The documentation for this class was generated from the following file: