For clarity, the input datasource to THIS method is a memory datasource.  But 
the source of that datasource was a geopackage (via CopyDataSource).

Best,
Jesse

From: gdal-dev <gdal-dev-boun...@lists.osgeo.org> on behalf of "Meyer, Jesse R. 
(GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev" 
<gdal-dev@lists.osgeo.org>
Reply-To: "Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC]" 
<jesse.r.me...@nasa.gov>
Date: Monday, August 21, 2023 at 3:30 PM
To: "gdal-dev@lists.osgeo.org" <gdal-dev@lists.osgeo.org>
Subject: [EXTERNAL] [BULK] [gdal-dev] Is SQLITE dialect supported on Memory OGR 
datasets?

Hi,

This works:
tc_lyr = execute_SQL(tree_canopy_mem_ds, "select * from trees", 
spatialFilter=c_geo)

However, this:
tc_lyr = execute_SQL(tree_canopy_mem_ds, "select * from trees", 
spatialFilter=c_geo, dialect="SQLITE")

Returns:
In Initialize(): sqlite3_step(SELECT _rowid_, * FROM 'trees' LIMIT 1): SQL 
logic error

Where execute_SQL = ogr.DataSource.ExecuteSQL

Which is naturally a surprise given that I’m not explicitly asking for the 
rowid, nor to limit the number of returned rows.

The docs claim that the SQLite dialect can be used with any OGR datasource, so 
I did expect this to work.  The input datasource is GeoPackage, which is based 
on SQLite, so I assume my install is built with SQLite, though I’d welcome 
advice on how to explicitly demonstrate this.

My GDAL version install is 3.6.4, on OSX 13.5.

Thanks,
Jesse
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev
  • ... Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
    • ... Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
    • ... Even Rouault
      • ... Meyer, Jesse R. (GSFC-618.0)[SCIENCE SYSTEMS AND APPLICATIONS INC] via gdal-dev
        • ... Even Rouault

Reply via email to