Package net.postgis.jdbc.geometry

# Class PointComposedGeom

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

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `LinearRing`, `LineString`, `MultiPoint`

public abstract class PointComposedGeom extends ComposedGeom
PointComposedGeom - base class for all composed geoms that contain only points.

Author:
  markus.schaber@logix-tt.com
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
`protected`
`PointComposedGeom(int type)`
``
`PointComposedGeom(int type, String value)`
``
`PointComposedGeom(int type, String value, boolean haveM)`
`protected`
`PointComposedGeom(int type, Point[] points)`

## Method Summary

Modifier and Type
Method
Description
`protected Geometry[]`
`createSubGeomArray(int pointcount)`
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
`Point`
`getPoint(int idx)`
optimized version
`Point[]`
`getPoints()`
Get the underlying Point array
`protected void`
`innerWKT(StringBuffer sb)`
Render the "inner" part of the WKT (inside the brackets) into the StringBuffer.
`int`
`numPoints()`
optimized version

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

`checkConsistency, equalsintern, getFirstPoint, getLastPoint, getSubGeometry, hashCode, isEmpty, iterator, mediumWKT, numGeoms, 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

### PointComposedGeom

protected PointComposedGeom(int type)

### PointComposedGeom

protected PointComposedGeom(int type, Point[] points)

### PointComposedGeom

public PointComposedGeom(int type, String value) throws SQLException

Throws:
  `SQLException`

### PointComposedGeom

public PointComposedGeom(int type, String value, boolean haveM) throws SQLException

Throws:
  `SQLException`

## Method Details

### 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

### createSubGeomArray

protected Geometry[] createSubGeomArray(int pointcount)
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:
  `pointcount` - number of elements in the array
Returns:
  Geometry array corresponding to the sub-geometry

### innerWKT

protected void innerWKT(StringBuffer sb)
Description copied from class: `Geometry`
Render the "inner" part of the WKT (inside the brackets) into the StringBuffer.

Overrides:
  `innerWKT` in class `ComposedGeom`
Parameters:
  `sb` - StringBuffer to render into

### numPoints

public int numPoints()
optimized version

Overrides:
  `numPoints` in class `ComposedGeom`
Returns:
  number of points in the geometry

### getPoint

public Point getPoint(int idx)
optimized version

Overrides:
  `getPoint` in class `ComposedGeom`
Parameters:
  `idx` - the index of the point, from 0 to numPoints()-1;
Returns:
  nth point in the geometry

### getPoints

public Point[] getPoints()
Get the underlying Point array

Returns:
  an array of Points within this geometry