[gdal-dev] Spatial Filters and PostGIS

Frank Warmerdam warmerdam at pobox.com
Thu Feb 11 13:53:41 EST 2010


Miller, Craig wrote:
> I was browsing the PostGIS  driver code today and noticed that when used 
> with ExecuteSQL the spatial filters appear to be getting applied on the 
> client side instead of the PostGIS side.  Am I understanding the code 
> correctly?

Craig,

Yes, that is correct.  When using ExecuteSQL() we pass on the SQL
directly without alternation which means we need to do the spatial
query manually after the fact.

On the other hand, when you access postgres/postgis through a normal
OGRLayer, we do attempt to incorporate the spatial and attribute filters
into the internally generated SQL used to read the features.

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