org.postgis.jts

## Class JtsGeometry

- java.lang.Object
- - org.postgresql.util.PGobject
  - - org.postgis.jts.JtsGeometry

All Implemented Interfaces:
  Serializable, Cloneable

    public class JtsGeometry
    extends org.postgresql.util.PGobject

JTS Geometry SQL wrapper. Supports PostGIS 1.x (lwgeom hexwkb) for writing and both PostGIS 0.x (EWKT) and 1.x (lwgeom hexwkb) for reading.

Author:
  Markus Schaber
See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.postgresql.util.PGobject

`type, value`

### Constructor Summary

Constructors
Constructor and Description
`JtsGeometry()` Constructor called by JDBC drivers
`JtsGeometry(org.locationtech.jts.geom.Geometry geom)`
`JtsGeometry(String value)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Object` `clone()`
`boolean` `equals(Object obj)`
`static org.locationtech.jts.geom.Geometry` `geomFromString(String value)`
`org.locationtech.jts.geom.Geometry` `getGeometry()`
`String` `getValue()`
`static void` `setSridRecurse(org.locationtech.jts.geom.Geometry geom, int srid)` Recursively set a srid for the geometry and all subgeometries
`void` `setValue(String value)`
`String` `toString()`

### Methods inherited from class org.postgresql.util.PGobject

`getType, hashCode, setType`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### JtsGeometry

    public JtsGeometry()

Constructor called by JDBC drivers

#### JtsGeometry

    public JtsGeometry(org.locationtech.jts.geom.Geometry geom)

#### JtsGeometry

    public JtsGeometry(String value)
                throws SQLException

Throws:
  `SQLException`

### Method Detail

#### setValue

    public void setValue(String value)
                  throws SQLException

Overrides:
  `setValue` in class `org.postgresql.util.PGobject`
Throws:
  `SQLException`

#### geomFromString

    public static org.locationtech.jts.geom.Geometry geomFromString(String value)
                                                             throws SQLException

Throws:
  `SQLException`

#### setSridRecurse

    public static void setSridRecurse(org.locationtech.jts.geom.Geometry geom,
                                      int srid)

Recursively set a srid for the geometry and all subgeometries

Parameters:
  `geom` - Geometry to work on
  `srid` - SRID to be set to

#### getGeometry

    public org.locationtech.jts.geom.Geometry getGeometry()

#### toString

    public String toString()

Overrides:
  `toString` in class `org.postgresql.util.PGobject`

#### getValue

    public String getValue()

Overrides:
  `getValue` in class `org.postgresql.util.PGobject`

#### clone

    public Object clone()

Overrides:
  `clone` in class `org.postgresql.util.PGobject`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `org.postgresql.util.PGobject`