Shp2sqlserver Usage Analysis

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.