Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.algorithm
Class MinimumDiameter

    java.lang.Object
      com.vividsolutions.jts.algorithm.MinimumDiameter

public class MinimumDiameter
extends java.lang.Object

Computes the minimum diameter of a `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.

Version:
  1.7
See Also:
  `ConvexHull`

Constructor Summary
`MinimumDiameter(Geometry inputGeom)` Compute a minimum diameter for a giver `Geometry`.
`MinimumDiameter(Geometry inputGeom, boolean isConvex)` Compute a minimum diameter for a giver `Geometry`, with a hint if the Geometry is convex (e.g.

Method Summary
`LineString` | `getDiameter()` Gets a `LineString` which is a minimum diameter
`double` | `getLength()` Gets the length of the minimum diameter of the input Geometry
`LineString` | `getSupportingSegment()` Gets the segment forming the base of the minimum diameter
`Coordinate` | `getWidthCoordinate()` Gets the `Coordinate` forming one end of the minimum diameter

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MinimumDiameter

    public MinimumDiameter(Geometry inputGeom)

  Compute a minimum diameter for a giver `Geometry`.

### MinimumDiameter

    public MinimumDiameter(Geometry inputGeom,
                           boolean isConvex)

  Compute a minimum diameter for a giver `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:
  `isConvex` - `true` if the input geometry is convex

Method Detail

### getLength

    public double getLength()

  Gets the length of the minimum diameter of the input Geometry

  Returns:
    the length of the minimum diameter

### getWidthCoordinate

    public Coordinate getWidthCoordinate()

  Gets the `Coordinate` forming one end of the minimum diameter

  Returns:
    a coordinate forming one end of the minimum diameter

### getSupportingSegment

    public LineString getSupportingSegment()

  Gets the segment forming the base of the minimum diameter

  Returns:
    the segment forming the base of the minimum diameter

### getDiameter

    public LineString getDiameter()

  Gets a `LineString` which is a minimum diameter

  Returns:
    a `LineString` which is a minimum diameter

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD