shp2sqlserver 用法简析
前端之家收集整理的这篇文章主要介绍了
shp2sqlserver 用法简析,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
shp2sqlserver用法简析 官方说明:
shp2sqlserver is a command line tool for loading shapefiles into Microsoft sql Server 2008. It is modeled after PostGIS's shp2pgsql,except that it loads directly into the database instead of writing sql to stdout. http://code.google.com/p/cumberland/wiki/shp2sqlserver 用法:
<div class="codetitle"><a style="CURSOR: pointer" data="71822" class="copybut" id="copybut71822" onclick="doCopy('code71822')">@H_404_3@ 代码如下:
<div class="codebody" id="code71822">
shp2
sqlserver.exe -h
Usage: shp2
sqlserver.exe [OPTIONS]+ "connectionString" "path to shapefile"
Loads a shapefile into Microsoft
sql Server 2008 example: shp2
sqlserver.exe "Data Source=.\
sqlExpress2008;Initial Catalog=spatialtest;Integrated Security=true" myshape.shp Options:
-s,--srid=VALUE The Spatial Reference ID (SRID). If not specified it defaults to -1.
-g,--geometry_column=VALUE The name of the geometry column
-t,--table_name=VALUE The table name to use
-k,--key_column=VALUE The name of the identity column to create for a primary key
-i,--index Create a spatial index
-l,--latlong Add spatial data as geography type
-a,--append Append data. If not specified,table will be created
-h,--help show this message and exit
server -g="SHAPE" -s="4326" -i "Data Source=.;Initial Catalog=largesite;Integrated Security=false;user id=sa;password=123456;" "D:\data\xyz.shp" 作者 彭金华