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

#include <LargestEmptyCircle.h>

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

Classes

class  Cell
 

Public Member Functions

 LargestEmptyCircle (const geom::Geometry *p_obstacles, double p_tolerance)
 
 LargestEmptyCircle (const geom::Geometry *p_obstacles, const geom::Geometry *p_boundary, double p_tolerance)
 
 ~LargestEmptyCircle ()=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 *p_obstacles, double p_tolerance)
 
static std::unique_ptr< geom::LineStringgetRadiusLine (const geom::Geometry *p_obstacles, double p_tolerance)
 

Private Member Functions

void setBoundary (const geom::Geometry *obstacles)
 
double distanceToConstraints (const geom::Coordinate &c)
 
double distanceToConstraints (double x, double y)
 
void compute ()
 
bool mayContainCircleCenter (const Cell &cell, const Cell &farthestCell)
 
void createInitialGrid (const geom::Envelope *env, std::priority_queue< Cell > &cellQueue)
 
Cell createCentroidCell (const geom::Geometry *geom)
 

Private Attributes

double tolerance
 
const geom::Geometryobstacles
 
const geom::GeometryFactoryfactory
 
std::unique_ptr< geom::Geometryboundary
 
operation::distance::IndexedFacetDistance obstacleDistance
 
bool done
 
std::unique_ptr< algorithm::locate::IndexedPointInAreaLocatorptLocator
 
std::unique_ptr< operation::distance::IndexedFacetDistanceboundaryDistance
 
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 60 of file LargestEmptyCircle.h.

Constructor & Destructor Documentation

geos::algorithm::construct::LargestEmptyCircle::LargestEmptyCircle ( const geom::Geometry p_obstacles,
double  p_tolerance 
)

Creates a new instance of a Largest Empty Circle construction.

Parameters
p_obstaclesa geometry representing the obstacles (points and lines)
p_tolerancethe distance tolerance for computing the circle center point
geos::algorithm::construct::LargestEmptyCircle::LargestEmptyCircle ( const geom::Geometry p_obstacles,
const geom::Geometry p_boundary,
double  p_tolerance 
)
geos::algorithm::construct::LargestEmptyCircle::~LargestEmptyCircle ( )
default

Member Function Documentation

void geos::algorithm::construct::LargestEmptyCircle::compute ( )
private
Cell geos::algorithm::construct::LargestEmptyCircle::createCentroidCell ( const geom::Geometry geom)
private
void geos::algorithm::construct::LargestEmptyCircle::createInitialGrid ( const geom::Envelope env,
std::priority_queue< Cell > &  cellQueue 
)
private
double geos::algorithm::construct::LargestEmptyCircle::distanceToConstraints ( const geom::Coordinate c)
private

Computes the signed distance from a point to the constraints (obstacles and boundary). Points outside the boundary polygon are assigned a negative distance. Their containing cells will be last in the priority queue (but will still end up being tested since they may be refined).

Parameters
cthe point to compute the distance for
Returns
the signed distance to the constraints (negative indicates outside the boundary)
double geos::algorithm::construct::LargestEmptyCircle::distanceToConstraints ( double  x,
double  y 
)
private
static std::unique_ptr<geom::Point> geos::algorithm::construct::LargestEmptyCircle::getCenter ( const geom::Geometry p_obstacles,
double  p_tolerance 
)
static

Computes the center point of the Largest Empty Circle `within a set of obstacles, up to a given tolerance distance.

Parameters
p_obstaclesa geometry representing the obstacles (points and lines)
p_tolerancethe distance tolerance for computing the center point
Returns
the center point of the Largest Empty Circle
std::unique_ptr<geom::Point> geos::algorithm::construct::LargestEmptyCircle::getCenter ( )
static std::unique_ptr<geom::LineString> geos::algorithm::construct::LargestEmptyCircle::getRadiusLine ( const geom::Geometry p_obstacles,
double  p_tolerance 
)
static

Computes a radius line of the Largest Empty Circle within a set of obstacles, up to a given distance tolerance.

Parameters
p_obstaclesa geometry representing the obstacles (points and lines)
p_tolerancethe distance tolerance for computing the center point
Returns
a line from the center of the circle to a point on the edge
std::unique_ptr<geom::LineString> geos::algorithm::construct::LargestEmptyCircle::getRadiusLine ( )
std::unique_ptr<geom::Point> geos::algorithm::construct::LargestEmptyCircle::getRadiusPoint ( )
bool geos::algorithm::construct::LargestEmptyCircle::mayContainCircleCenter ( const Cell cell,
const Cell farthestCell 
)
private
void geos::algorithm::construct::LargestEmptyCircle::setBoundary ( const geom::Geometry obstacles)
private

Member Data Documentation

std::unique_ptr<geom::Geometry> geos::algorithm::construct::LargestEmptyCircle::boundary
private

Definition at line 105 of file LargestEmptyCircle.h.

std::unique_ptr<operation::distance::IndexedFacetDistance> geos::algorithm::construct::LargestEmptyCircle::boundaryDistance
private

Definition at line 109 of file LargestEmptyCircle.h.

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

Definition at line 110 of file LargestEmptyCircle.h.

bool geos::algorithm::construct::LargestEmptyCircle::done
private

Definition at line 107 of file LargestEmptyCircle.h.

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

Definition at line 104 of file LargestEmptyCircle.h.

operation::distance::IndexedFacetDistance geos::algorithm::construct::LargestEmptyCircle::obstacleDistance
private

Definition at line 106 of file LargestEmptyCircle.h.

const geom::Geometry* geos::algorithm::construct::LargestEmptyCircle::obstacles
private

Definition at line 103 of file LargestEmptyCircle.h.

std::unique_ptr<algorithm::locate::IndexedPointInAreaLocator> geos::algorithm::construct::LargestEmptyCircle::ptLocator
private

Definition at line 108 of file LargestEmptyCircle.h.

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

Definition at line 111 of file LargestEmptyCircle.h.

double geos::algorithm::construct::LargestEmptyCircle::tolerance
private

Definition at line 102 of file LargestEmptyCircle.h.


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