|
|||||||||
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 |
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, 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.SQLException
protected abstract Geometry[] createSubGeomArray(int size)
protected boolean equalsintern(Geometry other)
Geometry
equalsintern
in class Geometry
public int numPoints()
Geometry
numPoints
in class Geometry
public Point getPoint(int n)
Geometry
getPoint
in class Geometry
n
- the index of the point, from 0 to numPoints()-1;public Point getLastPoint()
getLastPoint
in class Geometry
public Point getFirstPoint()
getFirstPoint
in class Geometry
public java.util.Iterator iterator()
public boolean isEmpty()
protected void mediumWKT(java.lang.StringBuffer sb)
Geometry
mediumWKT
in class Geometry
protected void innerWKT(java.lang.StringBuffer sb)
Geometry
innerWKT
in class Geometry
public int hashCode()
Geometry
hashCode
in class Geometry
public boolean checkConsistency()
Geometry
checkConsistency
in class Geometry
public 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 |