Package org.postgis
Class PGgeometry
- java.lang.Object
-
- org.postgresql.util.PGobject
-
- org.postgis.PGgeometry
-
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
PGgeometryLW
public class PGgeometry extends org.postgresql.util.PGobject- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringSRIDPREFIXThe prefix that indicates SRID presence
-
Constructor Summary
Constructors Constructor Description PGgeometry()PGgeometry(String value)PGgeometry(Geometry geom)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()static GeometrygeomFromString(String value)static GeometrygeomFromString(String value, boolean haveM)static GeometrygeomFromString(String value, BinaryParser bp)Maybe we could add more error checking here?static GeometrygeomFromString(String value, BinaryParser bp, boolean haveM)GeometrygetGeometry()intgetGeoType()StringgetValue()voidsetGeometry(Geometry newgeom)voidsetValue(String value)static String[]splitSRID(String whole)Splits a String at the first occurrence of border character.StringtoString()
-
-
-
Field Detail
-
SRIDPREFIX
public static final String SRIDPREFIX
The prefix that indicates SRID presence- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PGgeometry
public PGgeometry()
-
PGgeometry
public PGgeometry(Geometry geom)
-
PGgeometry
public PGgeometry(String value) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
setValue
public void setValue(String value) throws SQLException
- Overrides:
setValuein classorg.postgresql.util.PGobject- Throws:
SQLException
-
geomFromString
public static Geometry geomFromString(String value) throws SQLException
- Throws:
SQLException
-
geomFromString
public static Geometry geomFromString(String value, boolean haveM) throws SQLException
- Throws:
SQLException
-
geomFromString
public static Geometry geomFromString(String value, BinaryParser bp) throws SQLException
Maybe we could add more error checking here?- Parameters:
value- String representing the geometrybp- BinaryParser to use whe parsing- Returns:
- Geometry object parsed from the specified string value
- Throws:
SQLException- when a SQLException occurs
-
geomFromString
public static Geometry geomFromString(String value, BinaryParser bp, boolean haveM) throws SQLException
- Throws:
SQLException
-
getGeometry
public Geometry getGeometry()
-
setGeometry
public void setGeometry(Geometry newgeom)
-
getGeoType
public int getGeoType()
-
toString
public String toString()
- Overrides:
toStringin classorg.postgresql.util.PGobject
-
getValue
public String getValue()
- Overrides:
getValuein classorg.postgresql.util.PGobject
-
clone
public Object clone()
- Overrides:
clonein classorg.postgresql.util.PGobject
-
splitSRID
public static String[] splitSRID(String whole) throws SQLException
Splits a String at the first occurrence of border character. Poor man's String.split() replacement, as String.split() was invented at jdk1.4, and the Debian PostGIS Maintainer had problems building the woody backport of his package using DFSG-free compilers. In all the cases we used split() in the org.postgis package, we only needed to split at the first occurence, and thus this code could even be faster.- Parameters:
whole- the String to be split- Returns:
- String array containing the split elements
- Throws:
SQLException- when a SQLException occurrs
-
-