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:
- [email protected]
- 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 protectedPointComposedGeom(int type)PointComposedGeom(int type, String value)PointComposedGeom(int type, String value, boolean haveM)protectedPointComposedGeom(int type, Point[] points)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Geometry[]createSubGeomArray(int pointcount)Return the appropriate instance of the sub-geometry array - this encapsulates subclass specific array instantiationprotected GeometrycreateSubGeomInstance(String token, boolean haveM)Return the appropriate instance of the sub-geometry - this encapsulates subclass specific constructor callsPointgetPoint(int idx)optimized versionPoint[]getPoints()Get the underlying Point arrayprotected voidinnerWKT(StringBuffer sb)Render the "inner" part of the WKT (inside the brackets) into the StringBuffer.intnumPoints()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
-
-
-
-
Constructor Detail
-
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 Detail
-
createSubGeomInstance
protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException
Description copied from class:ComposedGeomReturn the appropriate instance of the sub-geometry - this encapsulates subclass specific constructor calls- Specified by:
createSubGeomInstancein classComposedGeom- Parameters:
token- The token containing the value for the sub-geometryhaveM- 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:ComposedGeomReturn the appropriate instance of the sub-geometry array - this encapsulates subclass specific array instantiation- Specified by:
createSubGeomArrayin classComposedGeom- 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:GeometryRender the "inner" part of the WKT (inside the brackets) into the StringBuffer.- Overrides:
innerWKTin classComposedGeom- Parameters:
sb- StringBuffer to render into
-
numPoints
public int numPoints()
optimized version- Overrides:
numPointsin classComposedGeom- Returns:
- number of points in the geometry
-
getPoint
public Point getPoint(int idx)
optimized version- Overrides:
getPointin classComposedGeom- 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
-
-