首页 > 代码库 > 将SHP导入MySQL中

将SHP导入MySQL中

ogr2ogr -f MySQL MySQL:smfs,host=127.0.0.1,user=root,password=gis D:\spatialData\HB\HuBeiPicture\HuBeiPicture\station.shp -nln gis_station_gdal -update -overwrite -lco engine=MYISAM

ogr2ogr -f MySQL MySQL:smfs,host=127.0.0.1,user=root,password=gis D:\spatialData\HB\HuBeiPicture\HuBeiPicture\station.shp -nln gis_station -update -overwrite -lco engine=MYISAM   
       
shp2mysql -c D:\spatialData\HB\HuBeiPicture\HuBeiPicture\station gis_station smfs | mysql smfs -u root -p gis
       
mysql -h 127.0.0.1 -u root -p gis
               
shp2mysql -c D:\spatialData\HB\station\station gis_station smfs | mysql -h 127.0.0.1 -u root -p smfs

shp2mysql -c D:\spatialData\HB\station\station gis_station smfs | mysql -h 127.0.0.1 -u root -p smfs

shp2mysql D:\spatialData\HB\station\station gis_station smfs > gis_station.sql

将SHP导入MySQL中