Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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 7 years ago.
patch for ogridbtablelayer.cpp to use st_intersects function on filter option
ogridbtablelayer.2.patch (1.8 KB ) - added by Andrés Ricagno 7 years ago.
Changes suggested by Even Rouault
ogridbtablelayer.3.patch (1.9 KB ) - added by Andrés Ricagno 7 years ago.
Fix sql error, when there is no spatial filter, sqlExec was empty

Download all attachments as: .zip

Change History (11)

comment:1 by Even Rouault, 7 years ago

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

comment:2 by Andrés Ricagno, 7 years ago

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

by Andrés Ricagno, 7 years ago

Attachment: ogridbtablelayer.patch added

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

comment:3 by Even Rouault, 7 years ago

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

by Andrés Ricagno, 7 years ago

Attachment: ogridbtablelayer.2.patch added

Changes suggested by Even Rouault

comment:4 by Even Rouault, 7 years ago

Resolution: fixed
Status: assignedclosed

In 39746:

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

comment:5 by Andrés Ricagno, 7 years ago

Resolution: fixed
Status: closedreopened

Sql error when ogrinfo was called without spat parameter

by Andrés Ricagno, 7 years ago

Attachment: ogridbtablelayer.3.patch added

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

comment:6 by Even Rouault, 7 years ago

Resolution: fixed
Status: reopenedclosed

In 39967:

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

comment:7 by Even Rouault, 7 years ago

@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 by Andrés Ricagno, 7 years ago

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

Note: See TracTickets for help on using tickets.