Shp2sqlserver Usage Analysis
Official notes:
Shp2sqlserver is a command line tool for loading shapefiles into Microsoft SQL Server 2008. It is modeled after PostGIS's shp2pgsql, cannot that it loads directly into the database instead of writing SQL to stdout.
Http://code.google.com/p/cumberland/wiki/shp2sqlserver
Usage:
Copy codeThe Code is as follows:
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
Example:
Shp2sqlserver-g = "SHAPE"-s = "4326"-I "Data Source = .; initial Catalog = largesite; Integrated Security = false; user id = sa; password = 123456; "" D: \ data \ xyz. shp"
Author Peng Jinhua