[gdal-dev] VRT with attribute filter?

Tyler Mitchell tyler.mitchell at actian.com
Fri May 18 11:33:50 EDT 2012


Thanks I'll check that out.  

I'm mainly using the VRT in QGIS against Ingres database.  QGIS isn't doing filtering properly for me, (even with passthrough=true) so I'm trying to discern whether it's a deficiency of our Ingres driver or if the functionality just doesn't exist yet elsewhere :)

On 2012-05-18, at 3:10 AM, Even Rouault wrote:

> Le vendredi 18 mai 2012 07:12:03, Tyler Mitchell a écrit :
>> I've done my best to comb through the code but can't see how to use an
>> attribute filter in a (OGR) VRT definition.
> 
> Tyler,
> 
> You have 2 possibilities :
> 
> 1) Probalby not what you want for your use case, but you can set a OGR VRT and 
> set externally an attribute filter on the returned layer. The attribute filter 
> should be applied directly on the underlying source layer if you set 
> <attrFilterPassThrough>TRUE</attrFilterPassThrough> in the <OGRVRTLayer> (or 
> if no explicit <Field> is present, or -in trunk- automatically in compatible 
> cases)
> 
> 2) Or you use a <SrcSQL> definition with a WHERE clause in it. In case the 
> underlying datasource as a specific implementation of ExecuteSQL() , that 
> should be efficient (and even if it doesn't the generic OGR SQL engine should 
> extract the WHERE clause and pass it to the SetAttributeFilter() 
> implementation of the underlying layer)
> 
> Even
> 
>> 
>> Tyler_______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev



Tyler Mitchell
Engineering Director 
Actian Corporation
tyler.mitchell at actian.com

MOBILE 250-303-1831
SKYPE spatialguru
www.actian.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120518/a2c3f3b1/attachment.html


More information about the gdal-dev mailing list