[Qgis-developer] OGR VRT and SrcSQL

Arnaud Morvan arnaud.morvan at camptocamp.com
Wed Nov 19 05:25:43 PST 2014


I am working with OGR VRT files in QGIS.

When I use the "SrcLayer" tag, all works correctly.
But when I use "SrcSQL" tag, QGIS seems to load the file correctly, but 
nothing appears in the canvas.

exemple:
<OGRVRTDataSource>
     <OGRVRTLayer name="test_shp_sql">
         <SrcDataSource relativeToVRT="1">test.shp</SrcDataSource>
         <SrcSQL dialect="sqlite">SELECT * FROM test</SrcSQL>
     </OGRVRTLayer>
</OGRVRTDataSource>

all attributes are correctly displayed in the attribute table.
when I use Save As ... to another shapefile, the new file display correctly.
"ogrinfo -la" gives me exactly the same results for "SrcLayer" and 
"SrcSQL" tags.
I've also tried the getWKT plugin which give me the same result for 
features from the two layers.

I do not understand what  goes wrong : OGR or QGIS ?

Arnaud



More information about the Qgis-developer mailing list