• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

shp2sqlserver 用法简析

mysql 搞代码 4年前 (2022-01-09) 27次浏览 已收录 0个评论

shp2sqlserver is a command line tool for loading shapefiles into Microsoft SQL Server

本文来源gao!%daima.com搞$代*!码$网3

2008

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.

用法:
代码如下:
shp2sqlserver.exe -h
Usage: shp2sqlserver.exe [OPTIONS]+ “connectionString” “path to shapefile”
Loads a shapefile into Microsoft SQL Server 2008

example: shp2sqlserver.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

示例:

shp2sqlserver -g=”SHAPE” -s=”4326″ -i “Data Source=.;Initial Catalog=largesite;Integrated Security=false;user id=sa;password=123456;” “D:\data\xyz.shp”

作者 彭金华


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:shp2sqlserver 用法简析

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址