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 InteriorPointArea

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

public class InteriorPointArea
extends java.lang.Object

Computes a point in the interior of an area geometry.

## Algorithm

- Find the intersections between the geometry and the horizontal bisector of the area's envelope
- Pick the midpoint of the largest intersection (the intersections will be lines and points)

Note: If a fixed precision model is used, in some cases this method may return a point which does not lie in the interior.

Version:
  1.7

Constructor Summary
`InteriorPointArea(Geometry g)`

Method Summary
`void` | `addPolygon(Geometry geometry)` Finds a reasonable point at which to label a Geometry.
`Coordinate` | `centre(Envelope envelope)` Returns the centre point of the envelope.
`Coordinate` | `getInteriorPoint()`
`protected LineString` | `horizontalBisector(Geometry geometry)`
`protected Geometry` | `widestGeometry(Geometry geometry)`

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

Constructor Detail

### InteriorPointArea

    public InteriorPointArea(Geometry g)

Method Detail

### getInteriorPoint

    public Coordinate getInteriorPoint()

### addPolygon

    public void addPolygon(Geometry geometry)

  Finds a reasonable point at which to label a Geometry.

  Parameters:
    `geometry` - the geometry to analyze
  Returns:
    the midpoint of the largest intersection between the geometry and a line halfway down its envelope

### widestGeometry

    protected Geometry widestGeometry(Geometry geometry)

### horizontalBisector

    protected LineString horizontalBisector(Geometry geometry)

### centre

    public Coordinate centre(Envelope envelope)

  Returns the centre point of the envelope.

  Parameters:
    `envelope` - the envelope to analyze
  Returns:
    the centre of the envelope

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