[gdal-dev] Problem with merging SHAPEs into SpatiaLite
even.rouault at spatialys.com
Thu Oct 5 14:10:33 PDT 2017
On jeudi 5 octobre 2017 05:20:02 CEST jratike80 wrote:
> 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:
> lid SQL statement : CREATE TABLE "test2000"("KUNTANUMER"
> VARCHAR(18),"MAAKUNTA" VARCHAR(2),"AVI" VARCHAR(2),"ELY"
> VARCHAR(37),OGR_STYLE VARCHAR HIDDEN,"GEOMETRY" BLOB_POLYGON_XYZ_0,
> 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.
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev