org.postgis
Class PGgeometry

java.lang.Object
  extended by org.postgresql.util.PGobject
      extended by org.postgis.PGgeometry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
PGgeometryLW

public class PGgeometry
extends org.postgresql.util.PGobject

See Also:
Serialized Form

Field Summary
static java.lang.String SRIDPREFIX
          The prefix that indicates SRID presence
 
Fields inherited from class org.postgresql.util.PGobject
type, value
 
Constructor Summary
PGgeometry()
           
PGgeometry(Geometry geom)
           
PGgeometry(java.lang.String value)
           
 
Method Summary
 java.lang.Object clone()
           
static Geometry geomFromString(java.lang.String value)
           
static Geometry geomFromString(java.lang.String value, BinaryParser bp)
          Maybe we could add more error checking here?
static Geometry geomFromString(java.lang.String value, BinaryParser bp, boolean haveM)
           
static Geometry geomFromString(java.lang.String value, boolean haveM)
           
 Geometry getGeometry()
           
 int getGeoType()
           
 java.lang.String getValue()
           
 void setGeometry(Geometry newgeom)
           
 void setValue(java.lang.String value)
           
static java.lang.String[] splitSRID(java.lang.String whole)
          Splits a String at the first occurrence of border charachter.
 java.lang.String toString()
           
 
Methods inherited from class org.postgresql.util.PGobject
equals, getType, setType
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SRIDPREFIX

public static final java.lang.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(java.lang.String value)
           throws java.sql.SQLException
Throws:
java.sql.SQLException
Method Detail

setValue

public void setValue(java.lang.String value)
              throws java.sql.SQLException
Overrides:
setValue in class org.postgresql.util.PGobject
Throws:
java.sql.SQLException

geomFromString

public static Geometry geomFromString(java.lang.String value)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

geomFromString

public static Geometry geomFromString(java.lang.String value,
                                      boolean haveM)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

geomFromString

public static Geometry geomFromString(java.lang.String value,
                                      BinaryParser bp)
                               throws java.sql.SQLException
Maybe we could add more error checking here?

Throws:
java.sql.SQLException

geomFromString

public static Geometry geomFromString(java.lang.String value,
                                      BinaryParser bp,
                                      boolean haveM)
                               throws java.sql.SQLException
Throws:
java.sql.SQLException

getGeometry

public Geometry getGeometry()

setGeometry

public void setGeometry(Geometry newgeom)

getGeoType

public int getGeoType()

toString

public java.lang.String toString()
Overrides:
toString in class org.postgresql.util.PGobject

getValue

public java.lang.String getValue()
Overrides:
getValue in class org.postgresql.util.PGobject

clone

public java.lang.Object clone()
Overrides:
clone in class org.postgresql.util.PGobject

splitSRID

public static java.lang.String[] splitSRID(java.lang.String whole)
                                    throws java.sql.SQLException
Splits a String at the first occurrence of border charachter. 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.

Throws:
java.sql.SQLException