[gdal-dev] ogr2ogr skipfailures and sqlite missing indexes
Seth G
sethg at geographika.co.uk
Thu Nov 29 00:56:28 PST 2018
Hi all,
When running a command similar to below (GDAL 2.3.1 on Windows):
ogr2ogr -f "SQLite" test.db test.shp -skipfailures -dsco SPATIALITE=YES -lco SPATIAL_INDEX=YES
If there are any errors (e.g. a MULTILINESTRING in a LINESTRING dataset), ogr2ogr skips the errors, but also skips creating the spatial index in SQLite. It took awhile to find why certain spatial queries weren't bringing back results later on.
Is there any reason to not create the spatial index anyway? If not a warning message as part of the output would be useful.
I got around the issue by adding the "-nlt GEOMETRY" parameter.
Regards,
Seth
--
web:http://geographika.co.uk
twitter: @geographika
More information about the gdal-dev
mailing list