[gdal-dev] Does -where read always the whole WFS layer?

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Mon Sep 17 13:20:48 PDT 2012


Even Rouault wrote:

>Le lundi 17 septembre 2012 09:44:36, Jukka Rahkonen a écrit :
>> Hi,
>>
>> I compared a few WFS requests with ogr2ogr by filtering either with -where
>> or with -sql doing the same select. The -where option was reading the
>> whole feature type and filtering the result on the client side while -sql
>> was building a GetFeature request with filter. Is it always so that with
>> the -where option GDAL is sending plain GetFeature and filters the result
>> on client side?
>>
>> My test request was the most simple one -where address='Streetname 10' vs.
>> -sql "select * from lv:address where address='Streetname 10"

> Jukka,

> I don't reproduce this behaviour. See below (edited to only keep the HTTP WFS
> requests)

> $ ogr2ogr -f GML out.gml "WFS:http://demo.deegree.org/deegree-wfs/services"
> app:Springs --debug HTTP,WFS -where "objectid = 10"
...
snip
...

> The GetFeature is sent with the appropriate FILTER.

> So perhaps you could provide the exact commandline you've used

Sorry, it was my fault due to faulty quotation.  This is the correct format at least with Windows and there is a similar example in the WFS driver documentation http://www.gdal.org/ogr/drv_wfs.html

>ogrinfo wfs:http://hip.latuviitta.org/cgi-bin/tinyows lv:hki_rakennusosoite_2012 -where "osoite='Oravatie 8'" --debug on

-Jukka-


More information about the gdal-dev mailing list