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) |
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 subgeometry array - this
encapsulates subclass specific array instantiation
|
protected abstract Geometry |
createSubGeomInstance(String token,
boolean haveM)
Return the appropriate instance of the subgeometry - 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 !
|
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, toString
public static final Geometry[] EMPTY
protected Geometry[] subgeoms
public ComposedGeom(int type)
type
- protected ComposedGeom(int type, Geometry[] geoms)
protected ComposedGeom(int type, String value, boolean haveM) throws SQLException
SQLException
public Geometry getSubGeometry(int index)
public int numGeoms()
protected abstract Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException
SQLException
protected abstract Geometry[] createSubGeomArray(int size)
protected boolean equalsintern(Geometry other)
Geometry
equalsintern
in class Geometry
public int numPoints()
Geometry
public Point getPoint(int n)
Geometry
public Point getLastPoint()
getLastPoint
in class Geometry
public Point getFirstPoint()
getFirstPoint
in class Geometry
public Iterator iterator()
public boolean isEmpty()
protected void mediumWKT(StringBuffer sb)
Geometry
protected void innerWKT(StringBuffer sb)
Geometry
public int hashCode()
Geometry
public boolean checkConsistency()
Geometry
checkConsistency
in class Geometry
Copyright © 2014. All rights reserved.