[gdal-dev] OGR Virtual Format for SQLite

gene martin.laloux at gmail.com
Sun Mar 11 11:41:40 EDT 2012


Hello, may be a stupid question but I am trying to create a OGR Virtual
Format file with a SQLite database foo.db3, a table named test and columns
x, y


<OGRVRTDataSource>
    <OGRVRTLayer name="foo">
        <SrcDataSource
relativeToVRT="1">SQLITE:database=foo.db3</SrcDataSource>  
        <SrcSQL>select * from test </SrcSQL> 
        <GeometryType>wkbPoint</GeometryType> 
            <LayerSRS>EPSG:31370</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="x" y="y"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>

and it does not work.

With Oracle, this works
<OGRVRTDataSource>
    <OGRVRTLayer name="test">
        <SrcDataSource>OCI:user/password at server/schema</SrcDataSource> 
        <SrcSQL>select * from test</SrcSQL> 
        <GeometryType>wkbPoint</GeometryType> 
            <LayerSRS>EPSG:31370</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="x" y="y"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>)

What is the correct syntax for SQLite ?




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/OGR-Virtual-Format-for-SQLite-tp4567549p4567549.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list