[gdal-dev] ogr2ogr overwrite parameter

Nicol Hermann gdal at geoworld.de
Tue Oct 8 12:04:15 PDT 2013


Hello list,

I am trying to batch load GPX files from a directory into a mysql
database.
In order to avoid duplicates I am using the '-overwrite' layer create
option.
The following line throw the error message

ogr2ogr -overwrite -f MYSQL
'MYSQL:dbname,host=localhost,user=me,password=' ${file} -lco
GEOMETRY=AS_XYZ -lco engine=MYSIAM  -sql "SELECT name FROM tracks"

MySQL error message:The used table type doesn't support SPATIAL indexes
Description: ALTER TABLE `tracks` ADD SPATIAL INDEX(`SHAPE`)

although I have also specified the   
-lco engine=MYSIAM

parameter.
Any idea how to change the line to avoid this error?

If I am changing the parameter to '-append' the import works with the
downside to have duplicates in if I rerun the script.

Thanks 
Best regards
Nicol



More information about the gdal-dev mailing list