Class H2GISFilterToSQL

  • All Implemented Interfaces:
    ExpressionVisitor, FilterVisitor

    public class H2GISFilterToSQL
    extends FilterToSQL
    jdbc-h2gis is an extension to connect H2GIS a spatial library that brings spatial support to the H2 Java database.

    H2GIS filter wrapper for H2GIS database.

    Author:
    Erwan Bocher
    • Constructor Detail

      • H2GISFilterToSQL

        public H2GISFilterToSQL()
    • Method Detail

      • visitLiteralGeometry

        protected void visitLiteralGeometry​(Literal expression)
                                     throws IOException
        Description copied from class: FilterToSQL
        Subclasses must implement this method in order to encode geometry filters according to the specific database implementation
        Overrides:
        visitLiteralGeometry in class FilterToSQL
        Throws:
        IOException
      • visit

        public Object visit​(Function function,
                            Object extraData)
                     throws RuntimeException
        Description copied from class: FilterToSQL
        Writes sql for a function expression. By default it will write the call by using the same arguments provided to the GeoTools function, subclasses should override on a case by case basis if this behavior is not the desired one.
        Specified by:
        visit in interface ExpressionVisitor
        Overrides:
        visit in class FilterToSQL
        Parameters:
        function - a function expression
        Throws:
        RuntimeException - If an IO error occurs.
        See Also:
        FilterToSQL.getFunctionName(Function)
      • cast

        protected String cast​(String encodedProperty,
                              Class target)
        Description copied from class: FilterToSQL
        Gives the opportunity to subclasses to force the property to the desired type. By default it simply writes out the property as-is (the property must be already escaped).
        Overrides:
        cast in class FilterToSQL
      • setFunctionEncodingEnabled

        public void setFunctionEncodingEnabled​(boolean functionEncodingEnabled)
        Parameters:
        functionEncodingEnabled -