程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> SqlServer2005 >> shp2sqlserver 用法簡析

shp2sqlserver 用法簡析

編輯:SqlServer2005
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

用法:
復制代碼 代碼如下:
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"

作者 彭金華
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved