<div dir="ltr">Jukka,<div><br></div><div>Agreed!  The SrcSQL directive in the VRT should accept a dialect option.  I'll try to do that this afternoon as we are "sprinting" here at FOSS4G NA and this would be a nice sized feature to add.</div>
<div><br></div><div>Best regards,</div><div>Frank</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 24, 2013 at 8:39 AM, Jukka Rahkonen <span dir="ltr"><<a href="mailto:jukka.rahkonen@mmmtike.fi" target="_blank">jukka.rahkonen@mmmtike.fi</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
This works with ogrinfo<br>
ogrinfo -ro cities.shp  -dialect SQLITE -sql "select GEOMETRY from cities"<br>
<br>
I tried to make a VRT file which would do the same<br>
<br>
<OGRVRTDataSource><br>
<OGRVRTLayer name="cities"><br>
<SrcDataSource>cities.shp</SrcDataSource><br>
<LayerSRS>WGS84</LayerSRS><br>
<SrcSQL>SELECT GEOMETRY from cities</SrcSQL><br>
</OGRVRTLayer><br>
</OGRVRTDataSource><br>
<br>
Now ogrinfo does not find geometries<br>
<br>
ogrinfo cities.vrt<br>
INFO: Open of `cities.vrt'<br>
      using driver `VRT' successful.<br>
1: citiesERROR 1: SQL Expression Parsing Error: syntax error<br>
ERROR 1: SQL statement failed, or returned no layer result:<br>
"SELECT GEOMETRY from cities"<br>
<br>
This exact use case is not at all interesting but there would be quite nice<br>
possibilities if Spatialite SQL queries could be fired from the VRT and all<br>
this would be supported for on-the-fly conversions<br>
<a href="http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html" target="_blank">http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html</a><br>
<br>
<br>
<br>
-Jukka Rahkonen-<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up   | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush    | Geospatial Software Developer<br>
</div>