Package net.postgis.jdbc.geometry
Class Polygon
- java.lang.Object
-
- net.postgis.jdbc.geometry.Geometry
-
- net.postgis.jdbc.geometry.ComposedGeom
-
- net.postgis.jdbc.geometry.Polygon
-
- All Implemented Interfaces:
Serializable
public class Polygon extends ComposedGeom
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.postgis.jdbc.geometry.ComposedGeom
EMPTY, subgeoms
-
Fields inherited from class net.postgis.jdbc.geometry.Geometry
ALLTYPES, dimension, GEOMETRYCOLLECTION, haveMeasure, LINEARRING, LINESTRING, MULTILINESTRING, MULTIPOINT, MULTIPOLYGON, POINT, POLYGON, srid, type, UNKNOWN_SRID
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Geometry[]createSubGeomArray(int ringcount)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 callsLinearRinggetRing(int idx)intnumRings()-
Methods inherited from class net.postgis.jdbc.geometry.ComposedGeom
checkConsistency, equalsintern, getFirstPoint, getLastPoint, getPoint, getSubGeometry, hashCode, innerWKT, isEmpty, iterator, mediumWKT, numGeoms, numPoints, setSrid
-
Methods inherited from class net.postgis.jdbc.geometry.Geometry
equals, equals, getDimension, getSrid, getType, getTypeString, getTypeString, getValue, initSRID, isMeasured, outerWKT, outerWKT, parseSRID, toString
-
-
-
-
Constructor Detail
-
Polygon
public Polygon()
-
Polygon
public Polygon(LinearRing[] rings)
-
Polygon
public Polygon(String value) throws SQLException
- Throws:
SQLException
-
Polygon
public Polygon(String value, boolean haveM) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
createSubGeomInstance
protected Geometry createSubGeomInstance(String token, boolean haveM) throws SQLException
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
protected Geometry[] createSubGeomArray(int ringcount)
Description copied from class:ComposedGeomReturn the appropriate instance of the sub-geometry array - this encapsulates subclass specific array instantiation- Specified by:
createSubGeomArrayin classComposedGeom- Parameters:
ringcount- number of elements in the array- Returns:
- Geometry array corresponding to the sub-geometry
-
numRings
public int numRings()
-
getRing
public LinearRing getRing(int idx)
-
-