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
PointComposedGeom - base class for all composed geoms that contain only
points.
- Author:
- markus.schaber@logix-tt.com
- See Also:
-
Field Summary
Fields inherited from class net.postgis.jdbc.geometry.ComposedGeom
EMPTY, subgeomsFields 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
ConstructorsModifierConstructorDescriptionprotectedPointComposedGeom(int type) PointComposedGeom(int type, String value) PointComposedGeom(int type, String value, boolean haveM) protectedPointComposedGeom(int type, Point[] points) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 callsgetPoint(int idx) optimized versionPoint[]Get the underlying Point arrayprotected voidinnerWKT(StringBuffer sb) Render the "inner" part of the WKT (inside the brackets) into the StringBuffer.intoptimized versionMethods inherited from class net.postgis.jdbc.geometry.ComposedGeom
checkConsistency, equalsintern, getFirstPoint, getLastPoint, getSubGeometry, hashCode, isEmpty, iterator, mediumWKT, numGeoms, setSridMethods inherited from class net.postgis.jdbc.geometry.Geometry
equals, equals, getDimension, getSrid, getType, getTypeString, getTypeString, getValue, initSRID, isMeasured, outerWKT, outerWKT, parseSRID, toString
-
Constructor Details
-
PointComposedGeom
protected PointComposedGeom(int type) -
PointComposedGeom
-
PointComposedGeom
- Throws:
SQLException
-
PointComposedGeom
- Throws:
SQLException
-
-
Method Details
-
createSubGeomInstance
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
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
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
optimized version- Overrides:
getPointin classComposedGeom- Parameters:
idx- the index of the point, from 0 to numPoints()-1;- Returns:
- nth point in the geometry
-
getPoints
Get the underlying Point array- Returns:
- an array of Points within this geometry
-