com.mapinfo.midev.geometry

## Interface IFeatureGeometry

All Superinterfaces:
  IGeometry, Serializable

All Known Subinterfaces:
  IMultiCurve, IMultiFeatureGeometry, IMultiPoint, IMultiPolygon, IPoint, IRectangle

    public interface IFeatureGeometry
    extends IGeometry

These are the first-class geometric objects that we expect most users of the geometry component to deal in. In particular, this class is what is returned from data access, and which can be persisted via data access.

All geometries can be represented as an equivalent `IFeatureGeometry`.

### Method Summary

All Methods Instance Methods Abstract Methods
`IFeatureGeometry` `getCopy()` Returns a non-transient copy of this `IFeatureGeometry` in this `IFeatureGeometry`'s coordinate system.
`IFeatureGeometry` `getCopy(CoordSys csys)` Returns a non-transient copy of this `IFeatureGeometry` in the specified coordinate system.
`DirectPosition` `getRepresentativePoint()` Returns the representative point of this `IFeatureGeometry`.
`void` `initializeRepresentativePoint()` Set the representative point for this `IFeatureGeometry` back to the default calculated value.
`void` `setRepresentativePoint(DirectPosition dp)` Set the representative point of this `IFeatureGeometry` (optional operation).

### Methods inherited from interface com.mapinfo.midev.geometry.IGeometry

`contains, getArea, getCoordSys, getDimension, getEnvelope, getPerimeter, getSpatialInfo, getType, isEmpty, isTransient, mAllSet, mSet, zAllSet, zSet`

### Method Detail

#### getRepresentativePoint

    DirectPosition getRepresentativePoint()
                                   throws InvalidGeometryException

Returns the representative point of this `IFeatureGeometry`. The representative point is a point that is guaranteed to be on the geometry.

If the representative point was specifically set for this geometry that direct position is returned, otherwise a representative point is calculated. The calculation attempts to find a point that is centrally located in the geometry.

Returns:
  the representative point of this `IFeatureGeometry`.
Throws:
  `InvalidGeometryException` - if the geometry is empty.
See Also:
  `IFeatureGeometry.setRepresentativePoint(DirectPosition)`

#### setRepresentativePoint

    void setRepresentativePoint(DirectPosition dp)
                         throws InvalidGeometryOperationException,
                                InvalidGeometryException,
                                UnsupportedGeometryOperationException

Set the representative point of this `IFeatureGeometry` (optional operation).

Parameters:
  `dp` - the DirectPosition in this geometry to use as the representative point in the future.
Throws:
  `InvalidGeometryOperationException` - if the position is not contained by this geometry.
  `InvalidGeometryException` - if this geometry is empty
  `UnsupportedGeometryOperationException` - if this operation is not supported by the `IFeatureGeometry`

#### initializeRepresentativePoint

    void initializeRepresentativePoint()
                                throws InvalidGeometryException

Set the representative point for this `IFeatureGeometry` back to the default calculated value.

Throws:
  `InvalidGeometryException` - if this geometry is empty
  `UnsupportedGeometryOperationException` - - if this operation is not supported by the IFeatureGeometry

#### getCopy

    IFeatureGeometry getCopy()

Returns a non-transient copy of this `IFeatureGeometry` in this `IFeatureGeometry`'s coordinate system.

Specified by:
  `getCopy` in interface `IGeometry`
Returns:
  a non-transient copy of this `IFeatureGeometry` in this `IFeatureGeometry`'s coordinate system.
See Also:
  `IFeatureGeometry.getCopy(com.mapinfo.midev.coordsys.CoordSys)`, `IGeometry.isTransient()`

#### getCopy

    IFeatureGeometry getCopy(CoordSys csys)

Returns a non-transient copy of this `IFeatureGeometry` in the specified coordinate system.

Specified by:
  `getCopy` in interface `IGeometry`
Parameters:
  `csys` - coordinate system of the returned copy
Returns:
  a non-transient copy of this `IFeatureGeometry` in the specified coordinate system.
See Also:
  `IGeometry.isTransient()`