On jeudi 5 octobre 2017 05:20:02 CEST jratike80 wrote: > Hi, > > I have a bit similar problem with making queries with SQLite SQL dialect if > shapefile name has numbers. > For example this succeeds fine with GDAL 2.3dev on Windows: > > ogrinfo -sql "select * from test2000" test2000.shp > > but this does not
> > > ogrinfo -dialect sqlite -sql "select * from test2000" test2000.shp > INFO: Open of `test2000.shp' > using driver `ESRI Shapefile' successful. > ERROR 1: Cannot create virtual table for layer 'test2000' : CREATE VIRTUAL: > inva > lid SQL statement : CREATE TABLE "test2000"("KUNTANUMER" > VARCHAR(3),"KUNTANIMI" > VARCHAR(18),"MAAKUNTA" VARCHAR(2),"AVI" VARCHAR(2),"ELY" > VARCHAR(2),"OGR_STYLE" > VARCHAR(37),OGR_STYLE VARCHAR HIDDEN,"GEOMETRY" BLOB_POLYGON_XYZ_0, > OGR_NATIVE_D > ATA VARCHAR, OGR_NATIVE_MEDIA_TYPE VARCHAR) > ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(select * from test2000): > no such table: test2000 > Nothing to do with the presence of numbers in the layer name. The issue here comes from the fact that your shapefile has a OGR_STYLE column, which confuses the SQLite SQL dialect wrapper that also tries to create a hidden OGR_STYLE column. I've just pushed a fix in trunk. Even -- Spatialys - Geospatial professional services http://www.spatialys.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev