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

Even Rouault even.rouault at mines-paris.org
Mon Sep 17 11:44:22 PDT 2012


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"
HTTP: Fetch(http://demo.deegree.org/deegree-
wfs/services?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0)
HTTP: Fetch(http://demo.deegree.org/deegree-
wfs/services?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=app:Springs,app:Country,app:DigitizeFeatures,app:Counties,app:Municipalities_edited,app:CountyBoundaries_edited,app:Municipalities,app:ZipCodes,app:Place,app:Philosopher,app:SI_Gazetteer,app:Railroads,app:StateBoundary)
HTTP: Fetch(http://demo.deegree.org/deegree-
wfs/services?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=app:Springs)
WFS: http://demo.deegree.org/deegree-
wfs/services?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=app:Springs&FILTER=%3CFilter%20xmlns%3D%22http:
%2F%2Fwww.opengis.net%2Fogc%22%20xmlns:app%3D%22http:
%2F%2Fwww.deegree.org%2Fapp%22%20xmlns:gml%3D%22http:
%2F%2Fwww.opengis.net%2Fgml%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Eobjectid%3C%2FPropertyName%3E%3CLiteral%3E10%3C%2FLiteral%3E%3C%2FPropertyIsEqualTo%3E%3C%2FFilter%3E

The GetFeature is sent with the appropriate FILTER.

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

Best regards,

Even

> 
> 
> 
> -Jukka Rahkonen-
> 
> 
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list