|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.postgis.Geometry
org.postgis.ComposedGeom
public abstract class ComposedGeom
ComposedGeom - Abstract base class for all Geometries that are composed out of other Geometries. In fact, this currently are all Geometry subclasses except Point.
| Field Summary | |
|---|---|
static Geometry[] |
EMPTY
|
protected Geometry[] |
subgeoms
The Array containing the geometries This is only to be exposed by concrete subclasses, to retain type safety. |
| Fields inherited from class org.postgis.Geometry |
|---|
ALLTYPES, dimension, GEOMETRYCOLLECTION, haveMeasure, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, srid, type, UNKNOWN_SRID |
| Constructor Summary | |
|---|---|
|
ComposedGeom(int type)
|
protected |
ComposedGeom(int type,
Geometry[] geoms)
|
protected |
ComposedGeom(int type,
java.lang.String value,
boolean haveM)
|
| Method Summary | |
|---|---|
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(java.lang.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 != 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(java.lang.StringBuffer sb)
Render the "inner" part of the WKT (inside the brackets) into the StringBuffer. |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
protected void |
mediumWKT(java.lang.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 |
| Methods inherited from class org.postgis.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 |
| Field Detail |
|---|
public static final Geometry[] EMPTY
protected Geometry[] subgeoms
| Constructor Detail |
|---|
public ComposedGeom(int type)
type -
protected ComposedGeom(int type,
Geometry[] geoms)
protected ComposedGeom(int type,
java.lang.String value,
boolean haveM)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public Geometry getSubGeometry(int index)
public int numGeoms()
protected abstract Geometry createSubGeomInstance(java.lang.String token,
boolean haveM)
throws java.sql.SQLException
java.sql.SQLExceptionprotected abstract Geometry[] createSubGeomArray(int size)
protected boolean equalsintern(Geometry other)
Geometry
equalsintern in class Geometrypublic int numPoints()
Geometry
numPoints in class Geometrypublic Point getPoint(int n)
Geometry
getPoint in class Geometryn - the index of the point, from 0 to numPoints()-1;public Point getLastPoint()
getLastPoint in class Geometrypublic Point getFirstPoint()
getFirstPoint in class Geometrypublic java.util.Iterator iterator()
public boolean isEmpty()
protected void mediumWKT(java.lang.StringBuffer sb)
Geometry
mediumWKT in class Geometryprotected void innerWKT(java.lang.StringBuffer sb)
Geometry
innerWKT in class Geometrypublic int hashCode()
Geometry
hashCode in class Geometrypublic boolean checkConsistency()
Geometry
checkConsistency in class Geometrypublic void setSrid(int srid)
Geometry
setSrid in class Geometry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||