mysql导入shapefile
特别说明
- mysql 版本大于等于5.7
- GDAL安装
- GDAL mysql 驱动安装
安装GDAL
windows 下安 [osgeo4w-setup-x86_64.exe](https://download.osgeo.org/osgeo4w/osgeo4w-setup-x86_64.exe)
通过osgeo4w 安装GDAL GDALmysql驱动 (网速慢 建议设置好的代理、或者翻墙代理)
GeoJSON 转 shapfile
.\ogr2ogr.exe -f "ESRI Shapefile" D:\GISdata\temp\temp\a.shp D:data\a.geojson
参考
shapfile 到 msyql
.\ogr2ogr.exe -f MySQL MySQL:gistest,user=root,password=1qaz@WSX D:\GISdata\temp\temp\a.shp -nln a -update -overwrite -lco GEOMETRY_NAME=geom -lco ENGINE=MyISAM
参考
mysql空间库
mysql 空间库 功能对比postgis 功能少很多。根据业务谨慎选择