Spatial Data solution for extracting MapInfo map data

Source: Internet
Author: User
Tags sql server management studio

Note: The prerequisites for reading this blog are as follows:

1. This example is based on Microsoft SQL Server 2008 R2 for commissioning.

2. Experience in Transact-SQL programming and SQL Server Management Studio.

3. Be familiar with or understand the spatial data types in Microsoft SQL Server 2008.

4. Have Professional GIS theoretical knowledge such as OGC and KML specifications.

5. Understand MapInfo map data and ArcGIS Shp map data format.

6. Understand SqlSpatialTools ).

 

 

 

First, analyze the case:If the product needs to implement the function of marking provinces, cities, and counties in the Map application developed by Silverlight, only the spatial data of provinces, cities, and counties can be obtained through analysis, then, the layer is dynamically drawn in the Map application and superimposed on the Map layer. The most important thing to draw layers by yourself is to obtain the spatial data of provinces, cities, and counties. it is wise to export the data from existing map data. This article introduces a method to quickly extract spatial data from MapInfo map data files based on my experience.

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/140K5JZ-0.jpg "width =" 953 "height =" 416 "/>

 

I. Prepare the environment

1. Install MapInfo Professional 8.0/8.5. This article is based on the MapInfo Professional 8.0 software platform.

2. Download the SQL space tool SqlSpatialTools ).

3. Install Microsoft SQL Server 2008 R2.

 

Ii. Use MapInfo Professional to convert the map data format

MapInfo Professional provides a map data format conversion tool. You can open the map format conversion panel using the menu "tools-> universal Tanslator", for example:

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/140K54M4-1.jpg "width =" 623 "height =" 510 "/>

 

Use the preceding steps for conversion. the map data of tab is. map Data in shp format. shp ,. shx ,. dbf and. prj files with four extensions are not described here. shp. Other files are auxiliary data files.

 

3. Import Shpfile map space data to SQL Server 2008

 I will not describe it in detail here. If you do not know how to import data, please go to "use space Tools to import ESRI format map data".

 

Iv. Preview spatial data in SQL Server Management Studio

SQL Server Management Studio supports two ways to view spatial data: Table Record mode and spatial result mode.

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/140K5HG-2.jpg "width =" 992 "height =" 374 "/>

 

5. query the results of a space Query

By querying spatial data tables in SSMS, you can use SQL built-in functions to convert spatial data into coordinate points. For example:

650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/140K5CL-3.jpg "width =" 590 "height =" 370 "/>

The above operation extracts the coordinate point set. You can directly Save the query result as a txt file and copy and use the geographic coordinate data.

 

Vi. Related Materials

[1] SQL Server 2008 Spatial data application Series 9: use space Tools to import ESRI format map data

[2], space Tools Spatial Tools): http://www.sharpgis.net/page/SQL-Server-2008-Spatial-Tools.aspx

This article is from the "beniao" blog, please be sure to keep this source http://beniao.blog.51cto.com/389148/640468

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.