Opened 12 months ago

Closed 11 months ago

Last modified 11 months ago

#6984 closed defect (fixed)

OGR-IDB optimitation spatial filter

Reported by: Andrés Ricagno Owned by: Andrés Ricagno
Priority: normal Milestone:
Component: OGR_SF Version: 2.1.2
Severity: normal Keywords: OGR IDB
Cc:

Description

We are testing the OGR IDB connector and note that the spatial filter is not implemented directly to RDBMS. I was making adaptations to the driver to optimize the query using spatial index and st_intersects function.

Attachments (3)

ogridbtablelayer.patch (1.2 KB) - added by Andrés Ricagno 12 months ago.
patch for ogridbtablelayer.cpp to use st_intersects function on filter option
ogridbtablelayer.2.patch (1.8 KB) - added by Andrés Ricagno 12 months ago.
Changes suggested by Even Rouault
ogridbtablelayer.3.patch (1.9 KB) - added by Andrés Ricagno 11 months ago.
Fix sql error, when there is no spatial filter, sqlExec was empty

Download all attachments as: .zip

Change History (11)

comment:1 Changed 12 months ago by Even Rouault

Do you intend to provide a patch since you implied you implemented it ?

comment:2 Changed 12 months ago by Andrés Ricagno

Yes, I am in the testing stage, soon I will be attaching a patch.

Changed 12 months ago by Andrés Ricagno

Attachment: ogridbtablelayer.patch added

patch for ogridbtablelayer.cpp to use st_intersects function on filter option

comment:3 Changed 12 months ago by Even Rouault

Using sql.c_str() as the argument of sql.Printf() might be dangerous since the input and output buffers are the same... Better copy first the current sql into a temporary string before

Changed 12 months ago by Andrés Ricagno

Attachment: ogridbtablelayer.2.patch added

Changes suggested by Even Rouault

comment:4 Changed 12 months ago by Even Rouault

Resolution: fixed
Status: assignedclosed

In 39746:

IDB: optimize spatial query using spatial index and st_intersects function (patch by aricagno, fixes #6984)

comment:5 Changed 11 months ago by Andrés Ricagno

Resolution: fixed
Status: closedreopened

Sql error when ogrinfo was called without spat parameter

Changed 11 months ago by Andrés Ricagno

Attachment: ogridbtablelayer.3.patch added

Fix sql error, when there is no spatial filter, sqlExec was empty

comment:6 Changed 11 months ago by Even Rouault

Resolution: fixed
Status: reopenedclosed

In 39967:

IDB: fix r39746 regression for ogrinfo without spat parameter (fixes #6984)

comment:7 Changed 11 months ago by Even Rouault

@aricgano I've committed in r39967 a different way of addressing the issue. I didn't compile it though, so please test ! (and for a next time, please provide a patch against latest trunk)

comment:8 Changed 11 months ago by Andrés Ricagno

Thanks Even, I will have it in consideration for the next one.

Note: See TracTickets for help on using tickets.