GEOS  3.4.2
Public Member Functions | List of all members
geos::algorithm::MinimumDiameter Class Reference

Computes the minimum diameter of a geom::Geometry. More...

#include <MinimumDiameter.h>

Public Member Functions

 MinimumDiameter (const geom::Geometry *newInputGeom)
 Compute a minimum diameter for a giver Geometry. More...
 
 MinimumDiameter (const geom::Geometry *newInputGeom, const bool newIsConvex)
 Compute a minimum diameter for a given Geometry, with a hint if the Geometry is convex (e.g. a convex Polygon or LinearRing, or a two-point LineString, or a Point). More...
 
double getLength ()
 Gets the length of the minimum diameter of the input Geometry. More...
 
geom::CoordinategetWidthCoordinate ()
 Gets the geom::Coordinate forming one end of the minimum diameter. More...
 
geom::LineStringgetSupportingSegment ()
 Gets the segment forming the base of the minimum diameter. More...
 
geom::LineStringgetDiameter ()
 Gets a LineString which is a minimum diameter. More...
 

Detailed Description

Computes the minimum diameter of a geom::Geometry.

The minimum diameter is defined to be the width of the smallest band that contains the geometry, where a band is a strip of the plane defined by two parallel lines. This can be thought of as the smallest hole that the geometry can be moved through, with a single rotation.

The first step in the algorithm is computing the convex hull of the Geometry. If the input Geometry is known to be convex, a hint can be supplied to avoid this computation.

See Also
ConvexHull

Constructor & Destructor Documentation

geos::algorithm::MinimumDiameter::MinimumDiameter ( const geom::Geometry newInputGeom)

Compute a minimum diameter for a giver Geometry.

Parameters
geoma Geometry
geos::algorithm::MinimumDiameter::MinimumDiameter ( const geom::Geometry newInputGeom,
const bool  newIsConvex 
)

Compute a minimum diameter for a given Geometry, with a hint if the Geometry is convex (e.g. a convex Polygon or LinearRing, or a two-point LineString, or a Point).

Parameters
geoma Geometry which is convex
isConvextrue if the input geometry is convex

Member Function Documentation

geom::LineString* geos::algorithm::MinimumDiameter::getDiameter ( )

Gets a LineString which is a minimum diameter.

Returns
a LineString which is a minimum diameter
double geos::algorithm::MinimumDiameter::getLength ( )

Gets the length of the minimum diameter of the input Geometry.

Returns
the length of the minimum diameter
geom::LineString* geos::algorithm::MinimumDiameter::getSupportingSegment ( )

Gets the segment forming the base of the minimum diameter.

Returns
the segment forming the base of the minimum diameter
geom::Coordinate* geos::algorithm::MinimumDiameter::getWidthCoordinate ( )

Gets the geom::Coordinate forming one end of the minimum diameter.

Returns
a coordinate forming one end of the minimum diameter

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