Class H2GISFilterToSQLHelper


  • public class H2GISFilterToSQLHelper
    extends Object
    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

      • H2GISFilterToSQLHelper

        public H2GISFilterToSQLHelper​(FilterToSQL filterToSQL)
        Parameters:
        filterToSQL -
    • Method Detail

      • createFilterCapabilities

        public static FilterCapabilities createFilterCapabilities​(boolean encodeFunctions,
                                                                  FilterCapabilities superCaps)
        Parameters:
        encodeFunctions -
        Returns:
      • visitBinarySpatialOperator

        protected Object visitBinarySpatialOperator​(BinarySpatialOperator filter,
                                                    PropertyName property,
                                                    Literal geometry,
                                                    boolean swapped,
                                                    Object extraData)
        Parameters:
        filter -
        property -
        geometry -
        swapped -
        extraData -
        Returns:
      • getFunctionName

        public static String getFunctionName​(Function function)
        Maps a function to its native db equivalent
        Parameters:
        function -
        Returns:
      • visitFunction

        public boolean visitFunction​(Function function,
                                     Object extraData)
                              throws IOException
        Performs custom visits for functions that cannot be encoded as functionName(p1, p2, ... pN).
        Parameters:
        function -
        extraData -
        Returns:
        Throws:
        IOException
      • cast

        public String cast​(String property,
                           Class<?> target)
        Parameters:
        property -
        target -
        Returns: