GeoTools
  1. GeoTools
  2. GEOT-4089

Loose BBOX is not supported for DB2

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.4
    • Fix Version/s: 2.7.5, 8.0-RC1
    • Component/s: jdbc-db2 plugin
    • Labels:
      None
    • Environment:
      All

      Description

      DB2FilterToSQL includes logic to set and test a looseBBOX flag. This controls whether a BBOX filter uses the ST_Intersects predicate or the EnvelopesIntersect predicate. The default is to use ST_Intersects. EnvelopesIntersect generally performs much better and is adequate in many applications. This is needed to support one of our current customers. As a result of the GeoTools JDBC design changes, there is no longer any way for an application to control the setting of the looseBBOX flag.

      I modified DB2NGDataStoreFactory to add and check a new LOOSEBBOX parameter which is passed to DB2SQLDialectPrepared.
      DB2SQLDialectPrepared and DB2SQLDialectBasic are modified to allow a looseBBOX parameter to be set which is then passed to DB2FilterToSQL.

      I tested this from Geoserver by manually adding a "Loose BBOX" parameter to the store XML file. If the parameter does not exist or is set to FALSE, the ST_Intersects predicate is used. If the parameter exists and is set to TRUE, EnvelopesIntersect is generated.

      Is DB2SQLDialectBasic used anymore? It isn't clear to me.

      This fix will also be required in trunk. I haven't sorted out the current design in trunk which looks quite different.

        Activity

        Hide
        Christian Mueller added a comment -
        Hi David, I modified your patch a little bit and committed to 2.7.x.

        The DB2SQLDialectBasic was intended to not using prepared statements, at the moment, it is "inactive".

        I registered the new parameter LOOSEBBOX, maybe it is now viewable on the geoserver GUI, not sure. If it is not, than this seems to be a Geoserver issue.

        The default for LOOSEBBOX is true, I did it like the PostGis and the Oracle plugin.

        Last not least, I did the whole stuff on trunk too.

        Maybe you can check out a nightly build tomorrow or in 2 days and send me a report.



        Perhaps you can you check out a nightly build

        Show
        Christian Mueller added a comment - Hi David, I modified your patch a little bit and committed to 2.7.x. The DB2SQLDialectBasic was intended to not using prepared statements, at the moment, it is "inactive". I registered the new parameter LOOSEBBOX, maybe it is now viewable on the geoserver GUI, not sure. If it is not, than this seems to be a Geoserver issue. The default for LOOSEBBOX is true, I did it like the PostGis and the Oracle plugin. Last not least, I did the whole stuff on trunk too. Maybe you can check out a nightly build tomorrow or in 2 days and send me a report. Perhaps you can you check out a nightly build
        Hide
        Christian Mueller added a comment -
        Hi David, does this feature work for you. I want to close this issue.
        Show
        Christian Mueller added a comment - Hi David, does this feature work for you. I want to close this issue.

          People

          • Assignee:
            Christian Mueller
            Reporter:
            David Adler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: