Class ST_PointFromText

  • All Implemented Interfaces:
    org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class ST_PointFromText
    extends org.h2gis.api.DeterministicScalarFunction
    Convert a WKT String into a Point.
    Author:
    Nicolas Fortin, Adam Gouge
    • Constructor Detail

      • ST_PointFromText

        public ST_PointFromText()
        Default constructor
    • Method Detail

      • getJavaStaticMethod

        public String getJavaStaticMethod()
      • toGeometry

        public static org.locationtech.jts.geom.Geometry toGeometry​(String wKT)
                                                             throws SQLException
        Convert the WKT String to a Geometry with the given SRID.
        Parameters:
        wKT - Well Known Text value
        Returns:
        Geometry
        Throws:
        SQLException - Invalid argument or the geometry type is wrong.
      • toGeometry

        public static org.locationtech.jts.geom.Geometry toGeometry​(String wKT,
                                                                    int srid)
                                                             throws SQLException
        Convert the WKT String to a Geometry with the given SRID.
        Parameters:
        wKT - Well Known Text value
        srid - Valid SRID
        Returns:
        Geometry
        Throws:
        SQLException - Invalid argument or the geometry type is wrong.