Class ST_InsertPoint

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

    public class ST_InsertPoint
    extends org.h2gis.api.DeterministicScalarFunction
    This function insert a point on geometry looking for the nearest coordinate segment
    Author:
    Erwan Bocher, CNRS, 2020
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static double PRECISION  
      • Fields inherited from interface org.h2gis.api.Function

        PROP_NAME, PROP_REMARKS
      • Fields inherited from interface org.h2gis.api.ScalarFunction

        PROP_DETERMINISTIC
    • Constructor Summary

      Constructors 
      Constructor Description
      ST_InsertPoint()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getJavaStaticMethod()  
      static org.locationtech.jts.geom.Geometry insertPoint​(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Point point)
      Returns a new geometry based on an existing one, with a specific point as a new vertex.
      static org.locationtech.jts.geom.Geometry insertPoint​(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Point point, double tolerance)
      Returns a new geometry based on an existing one, with a specific point as a new vertex.
      • Methods inherited from class org.h2gis.api.AbstractFunction

        addProperty, getProperty, removeProperty
      • Methods inherited from interface org.h2gis.api.Function

        getProperty
    • Constructor Detail

      • ST_InsertPoint

        public ST_InsertPoint()
    • Method Detail

      • getJavaStaticMethod

        public String getJavaStaticMethod()
      • insertPoint

        public static org.locationtech.jts.geom.Geometry insertPoint​(org.locationtech.jts.geom.Geometry geometry,
                                                                     org.locationtech.jts.geom.Point point)
                                                              throws SQLException
        Returns a new geometry based on an existing one, with a specific point as a new vertex. A default distance 10E-6 is used to snap the input point.
        Parameters:
        geometry -
        point -
        Returns:
        Throws:
        SQLException
      • insertPoint

        public static org.locationtech.jts.geom.Geometry insertPoint​(org.locationtech.jts.geom.Geometry geometry,
                                                                     org.locationtech.jts.geom.Point point,
                                                                     double tolerance)
                                                              throws SQLException
        Returns a new geometry based on an existing one, with a specific point as a new vertex.
        Parameters:
        geometry -
        point -
        tolerance -
        Returns:
        Null if the vertex cannot be inserted
        Throws:
        SQLException - If the vertex can be inserted but it makes the geometry to be in an invalid shape