Class 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
    • Constructor Detail

      • JtsGeometry

        public JtsGeometry()
        Constructor called by JDBC drivers
      • JtsGeometry

        public JtsGeometry​(org.locationtech.jts.geom.Geometry geom)
    • Method Detail

      • setValue

        public void setValue​(String value)
                      throws SQLException
        Overrides:
        setValue in class org.postgresql.util.PGobject
        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