Using ogr2ogr to import into MySQL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using ogr2ogr to import into MySQL

Arielle Simmons



I am having problems with ogr2ogr and keep getting different versions of the error:


ERROR 1: MySQL error message: The used table type doesn't support SPATIAL indexes.

Description: ALTER TABLE 'test_poly' ADD SPATIAL INDEX('SHAPE')


my command (entering it in FWTools Shell) is:


ogr2ogr -f "MySQL" MYSQL:"test,host=,user=root,port=3306" -nln test_poly -a_srs "EPSG:3857" <path to shapefile> -update -overwrite



...adding '-lco GEOMETRY_NAME <field name>' doesn't do anything...

...also moving the <path to shapfile> ti tge ebdm behind -lco engine=MYSIAM does nothing...



All I see is the tables 'geometry_columns' and spatial_ref_sys' and 'test_poly' being created...but no data *(i.e. when I use "Select Rows - Limit 1000").


What am I missing? 


I am a bit new to MySQL...but I read as much documentation as I could find...I thought I could set the spatial index by going to Engine: I wrong?


Arielle Simmons

Planner/GIS Specialist

Pioneer Valley Planning Commission

60 Congress St., First Floor

Springfield, MA 01104

Phone: 413-781-6045 ext 301




FWTools mailing list
[hidden email]