public abstract class ComposedGeom extends Geometry
| Modifier and Type | Field and Description |
|---|---|
static Geometry[] |
EMPTY |
protected Geometry[] |
subgeoms
The Array containing the geometries
This is only to be exposed by concrete subclasses, to retain type safety.
|
ALLTYPES, dimension, GEOMETRYCOLLECTION, haveMeasure, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, srid, type, UNKNOWN_SRID| Modifier | Constructor and Description |
|---|---|
|
ComposedGeom(int type)
Constructs an instance with the specified type
|
protected |
ComposedGeom(int type,
Geometry[] geoms) |
protected |
ComposedGeom(int type,
String value,
boolean haveM) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkConsistency()
Do some internal consistency checks on the geometry.
|
protected abstract Geometry[] |
createSubGeomArray(int size)
Return the appropriate instance of the sub-geometry array - this
encapsulates subclass specific array instantiation
|
protected abstract Geometry |
createSubGeomInstance(String token,
boolean haveM)
Return the appropriate instance of the sub-geometry - this encapsulates
subclass specific constructor calls
|
protected boolean |
equalsintern(Geometry other)
Whether test coordinates for geometry - subclass specific code
Implementors can assume that dimensin, type, srid and haveMeasure are
equal, other != null and other is the same subclass.
|
Point |
getFirstPoint()
Optimized version
|
Point |
getLastPoint()
Optimized version
|
Point |
getPoint(int n)
Get the nth Point of the geometry
|
Geometry |
getSubGeometry(int index) |
int |
hashCode()
java.lang.Object hashCode implementation
|
protected void |
innerWKT(StringBuffer sb)
Render the "inner" part of the WKT (inside the brackets) into the
StringBuffer.
|
boolean |
isEmpty() |
Iterator |
iterator() |
protected void |
mediumWKT(StringBuffer sb)
Render the WKT without the type name, but including the brackets into the
StringBuffer
|
int |
numGeoms() |
int |
numPoints()
Return the number of Points of the geometry
|
void |
setSrid(int srid)
Recursively sets the srid on this geometry and all contained
subgeometries
|
equals, equals, getDimension, getSrid, getType, getTypeString, getTypeString, getValue, initSRID, isMeasured, outerWKT, outerWKT, parseSRID, toStringpublic static final Geometry[] EMPTY
protected Geometry[] subgeoms
public ComposedGeom(int type)
type - int value corresponding to the geometry type.protected ComposedGeom(int type,
Geometry[] geoms)
protected ComposedGeom(int type,
String value,
boolean haveM)
throws SQLException
SQLExceptionpublic Geometry getSubGeometry(int index)
public int numGeoms()
protected abstract Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException
token - The token containing the value for the sub-geometryhaveM - flag to indicate the existence of a measureSQLException - if a SQLException is thrownprotected abstract Geometry[] createSubGeomArray(int size)
size - number of elements in the arrayprotected boolean equalsintern(Geometry other)
Geometryequalsintern in class Geometryother - geometry to comparepublic int numPoints()
Geometrypublic Point getPoint(int n)
Geometrypublic Point getLastPoint()
getLastPoint in class Geometrypublic Point getFirstPoint()
getFirstPoint in class Geometrypublic Iterator iterator()
public boolean isEmpty()
protected void mediumWKT(StringBuffer sb)
Geometryprotected void innerWKT(StringBuffer sb)
Geometrypublic int hashCode()
Geometrypublic boolean checkConsistency()
GeometrycheckConsistency in class GeometryCopyright © 2018. All rights reserved.