[Gdal-dev] GDAL/OGR and Postgres

Frank Warmerdam warmerdam at pobox.com
Wed Oct 12 14:27:39 EDT 2005


On 10/12/05, Marc Florisson <marc.florisson at dryade.net> wrote:
> Hi,
>
> I wonder how to filter reults with ExecuteSQL (from OGRDataSource class)
>
> - With mif/mid files I don't have any trouble.
> - But with Postgres 8.0.4 (installed with Postgis extension and GDAL has
> been compiled with Postgres support),
> ExecuteSQL doesn't read the second parameter (poSpatialFilter)
> and I get too much results./
>
> /What should I do to make it work ?/

Mark,

Sorry, but the spatial filters just aren't applied in ExecuteSQL()
for a number of the drivers.   I could certainly modify the PostGIS
driver to apply it to the results after the come back from the
database but that won't help much as far as performance goes.
And it won't guarantee that it will be applied on all providers.

The spatial filter is ignored because it is very hard to integrate
into an arbitrary SQL statement.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list