11

我需要将 shape 文件中的空间数据导入 MySQL 表。我能够导入 PostGreSQL。MySQL 的任何指针。我需要 MySQL 表中的数据。

4

2 回答 2

11

安装 FWtool 试试这个

ogr2ogr -f MySQL MySQL:database_name,host=localhost,user=root,password=1234 C:\route_path\line.shp -nln datatable_name -update -overwrite -lco engine=MYISAM

尝试在任何进程中安装以获得更好的结果 Osgeo4w

http://trac.osgeo.org/osgeo4w/

于 2013-03-16T19:48:48.307 回答
1

I have just used the ogr2ogr command line tool to import the shape file into the mysql database. Make sure that the database server allows external connections. If doesn't, then it throws all sorts of errors.

Once you have that you can use -

Select ASTEXT(Shape) POLYGON from world to get an array of the polygon coordinates etc

于 2014-03-25T22:06:46.253 回答