Hi,

This works with GDAL from OSGeo4W, GDAL 3.0.2, released 2019/10/28

ogrinfo any.gpkg -dialect sqlite -sql "select spatialite_version()"
INFO: Open of `any.gpkg'
      using driver `GPKG' successful.

Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
spatialite_version(): String (0.0)
OGRFeature(SELECT):0
  spatialite_version() (String) = 4.3.0

With GDAL-del from gisinternals, GDAL 3.1.0dev, released 2019/99/99, Spatialite 
is not found if I make a query to GeoPackage database. The error is
ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(select spatialite_version()):
  no such function: spatialite_version

However, when datasource is not gpkg then Spatialite is found
ogrinfo any.shp -dialect sqlite -sql "select spatialite_version()"
INFO: Open of `any.shp'
      using driver `ESRI Shapefile' successful.

Layer name: SELECT
Geometry: None
Feature Count: 1
Layer SRS WKT:
(unknown)
spatialite_version(): String (0.0)
OGRFeature(SELECT):0
  spatialite_version() (String) = 4.3.0-RC1

Obviously mod_spatialite is not loaded in the gpkg case but I wonder if the 
issue is in GDAL-dev or in the gisinternals build.

-Jukka Rahkonen-


_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to