Simplifying Spatial Data

Using SQL Server 2008’s spatial data types to implement geospatial solutions

It has always been possible to work with geospatial data in SQL Server using built-in geometric and trigonometric functions such as SIN(), COS(), and ACOS(). However, SQL Server 2008’s spatial data types made complex spatial queries a lot more accessible to those of us who don’t remember what a cosine actually is. In this article, I will show you how to use these built-in functions within a user-defined function (UDF) to illustrate the traditional method of calculating ...

Buy This Project Plan Now!

This content is part of the Migrating to SQL Server 2008 & 2008 R2 Project Plan.

Purchase this project plan to receive:

  • Step-by-step guidance for managing your project, start to finish
  • Tested advice for preparing for and completing your project
  • Insights to help you avoid common pitfalls and traps

Already registered? here

Discuss this Article 5

ksurvance
on Apr 19, 2011
Bijnens, You are right. This must have happened when the page was set up. I looked at the listings files I sent with the article and the names are there. I am sorry for the problem and thanks for posting the xml that fixes the problem. Kurt
alzdba
on Apr 1, 2011
You didn't provide column names for the last 3 columns of the xml file.
To make it work I altered the fmt file like this:
<COLUMN SOURCE="f09" xsi:type="SQLFLT8" NAME="land_area_mile" />
<COLUMN SOURCE="f10" xsi:type="SQLFLT8" NAME="latitude" />
<COLUMN SOURCE="f11" xsi:type="SQLFLT8" NAME="longitude" />
</ROW>
</BCPFORMAT>

Please correct me if I'm wrong
ksurvance
on Apr 19, 2011
Peter, Sorry, I clicked the finish button by accident before I finished. there is not enough space in this article to cover the background necessary to make a discussion of grds and tesselation understandable to the intended audience. I chose to accept the default settings for the index. You are correct in thinking that we might have improved the performance of the spatial index by fine-tuning it. However, I don't think it would have affected the final conclusion that the traditional indexes performed much better in this case. Regards, Kurt
ivan.peter@cora...
on Apr 1, 2011
I wonder why you do not mention SPATIAL INDEX [1] at all. It's the best way to use in database on geometry columns. Comparing the performance of spatial index would be a valuable outcome. (Or maybe I'm just missing the point :)

[1] http://technet.microsoft.com/en-us/library/bb934196.aspx
ksurvance
on Apr 19, 2011
Peter, We did not cover Geometry spatial types in this article at all, as I mentioned near the beginning of the article. Since this is an article on Simplified spatial data, I did not cover the complexities of tellelation

Please or Register to post comments.

Migrating to SQL Server 2008 & 2008 R2 Project Plan

<<< Back to the Project Plan


Planning


SQL Server 2008 R2 Requirements

SQL Server Version Build Numbers

SQL Server 2008 R2 New Features

Migrating


Upgrading to SQL Server 2008 R2

Migrating to SQL Server 2008

How to Upgrade to SQL Server 2008 from SQL Server 2000

Tools for Migrating Access to SQL Server

SQL Server 2008 - Episode 8: How Do I Upgrade

Fine Tune Your Migration


Database Administration

Top 10 SQL Server Performance Tuning Tips

Configuring SQL Server 2008’s Resource Governor

Set Up a SQL Server 2008 Cluster

Upgrading a SQL Server 2005 Cluster to a SQL Server 2008

Compression in SQL Server 2008

An Overview of SQL Server High Availability Options

3 Log Shipping Techniques

Efficient Data Management in SQL Server 2008, Part 1

Efficient Data Management in SQL Server 2008, Part 2

Build a Policy-Based Management System for SQL Server 2008

Synchronizing Disparate Data with Master Data Services

Introducing the SQL Server Utility

Tips for Using SQL Server Management Studio 2008

SQL Server 2008 - Episode 2: Under the Hood

SQL Server 2008 - Episode 5: Knowing Your Data

SQL Server 2008 - Episode 6: 64 Bit and You

SQL Server 2008 - Episode 7: Ready for your Environment

SQL Server 2008 R2: Enterprise Data Access for Mission-Critical Applications

Backup and Recovery

Database Mirroring in SQL Server 2008 R2 and SQL Server 2008

Advanced BACKUP and RESTORE Options

Step-by-Step Approach to Differential Backup and Recovery

Security and Auditing

Hardening SQL Server

SQL Server 2008 Boosts Built-in Encryption

SQL Server Ecryption

SQL Server 2008 - Episode 1: How Can I Secure Data

SQL Server 2008 - Episode 3: Protecting Your Data

Virtualization

Optimizing SQL Server Performance in a Virtual Environment

7 Best Practices for Running SQL Server on Hyper-V

T-SQL

Upgrading Clusters to SQL Server 2012 When AlwaysOn Availability Groups Will Be Used

Planning and Implementing a SQL Server Cluster

More SQL Server 2008 T-SQL Improvements

SQL Server 2008’s T-SQL Development and Debugging Features

Parallelism Enhancements in SQL Server 2008

Date and Time Support in SQL Server 2008

Using SQL Server 2008 FILESTREAM Storage

Using SQL Server 2008's FILESTREAM Data Type

Simplifying Spatial Data

SQL Server 2008 - Episode 4: What About Developers

Business Intelligence

Introducing PowerPivot for SharePoint

SQL Server 2008 Change Data Capture

SharePoint and SQL Server Integration

5 Considerations for Setting up a SQL Server 2008 Backend for SharePoint 2010

SSRS 2008 R2 and SharePoint 2010 Integration

PowerPivot and Excel

How to Create PowerPivot Applications in Excel 2010

A Walkthrough of PowerPivot for Excel 2010

A Walkthrough of PowerPivot for Excel 2010

Integrating SQL Server 2008 Spatial Capabilities with Microsoft Virtual Earth

Managed Self-Service BI

SQL Server Reporting Services

Unlock the Secrets of SQL Server 2008 Reporting Services

A Candid Look at Report Builder 3.0

SQL Server Reporting Services

Use Checkpoints to Restart Failed SSIS Packages

SSIS Novices’ Guide to Data Warehouses: Moving Data into the Data Warehouse

SQL Server Reporting Services

Backup Basics for SQL Server Analysis Services