Package net.postgis.jdbc.geometry

# Class MultiPolygon

java.lang.Object
net.postgis.jdbc.geometry.Geometry
net.postgis.jdbc.geometry.ComposedGeom
net.postgis.jdbc.geometry.MultiPolygon

All Implemented Interfaces:
  `Serializable`

public class MultiPolygon extends ComposedGeom

See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class net.postgis.jdbc.geometry.ComposedGeom

`EMPTY, subgeoms`

### Fields inherited from class net.postgis.jdbc.geometry.Geometry

`ALLTYPES, dimension, GEOMETRYCOLLECTION, haveMeasure, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, srid, type, UNKNOWN_SRID`

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`MultiPolygon()`
``
`MultiPolygon(String value)`
`protected`
`MultiPolygon(String value, boolean haveM)`
``
`MultiPolygon(Polygon[] polygons)`

## Method Summary

Modifier and Type
Method
Description
`protected Geometry[]`
`createSubGeomArray(int npolygons)`
Return the appropriate instance of the sub-geometry array - this encapsulates subclass specific array instantiation
`protected Geometry`
`createSubGeomInstance(String token, boolean haveM)`
Return the appropriate instance of the sub-geometry - this encapsulates subclass specific constructor calls
`Polygon`
`getPolygon(int idx)`
`Polygon[]`
`getPolygons()`
`int`
`numPolygons()`

### Methods inherited from class net.postgis.jdbc.geometry.ComposedGeom

`checkConsistency, equalsintern, getFirstPoint, getLastPoint, getPoint, getSubGeometry, hashCode, innerWKT, isEmpty, iterator, mediumWKT, numGeoms, numPoints, setSrid`

### Methods inherited from class net.postgis.jdbc.geometry.Geometry

`equals, equals, getDimension, getSrid, getType, getTypeString, getTypeString, getValue, initSRID, isMeasured, outerWKT, outerWKT, parseSRID, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### MultiPolygon

public MultiPolygon()

### MultiPolygon

public MultiPolygon(Polygon[] polygons)

### MultiPolygon

public MultiPolygon(String value) throws SQLException

Throws:
  `SQLException`

### MultiPolygon

protected MultiPolygon(String value, boolean haveM) throws SQLException

Throws:
  `SQLException`

## Method Details

### createSubGeomArray

protected Geometry[] createSubGeomArray(int npolygons)
Description copied from class: `ComposedGeom`
Return the appropriate instance of the sub-geometry array - this encapsulates subclass specific array instantiation

Specified by:
  `createSubGeomArray` in class `ComposedGeom`
Parameters:
  `npolygons` - number of elements in the array
Returns:
  Geometry array corresponding to the sub-geometry

### createSubGeomInstance

protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException
Description copied from class: `ComposedGeom`
Return the appropriate instance of the sub-geometry - this encapsulates subclass specific constructor calls

Specified by:
  `createSubGeomInstance` in class `ComposedGeom`
Parameters:
  `token` - The token containing the value for the sub-geometry
  `haveM` - flag to indicate the existence of a measure
Returns:
  the new sub-geometry
Throws:
  `SQLException` - if a SQLException is thrown

### numPolygons

public int numPolygons()

### getPolygon

public Polygon getPolygon(int idx)

### getPolygons

public Polygon[] getPolygons()