: Alastair Aitchison
: Beginning Spatial with SQL Server 2008
: Apress
: 9781430218302
: 1
: CHF 46,90
:
: Allgemeines, Lexika
: English
: 456
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF

Microsoft SQL Server 2008 introduces new geography and geometry spatial datatypes that enable the storage of structured data describing the shape and position of objects in space. This is an interesting and exciting new feature, with many potentially useful applications.

Begin ing Spatial with SQL Server 2008 covers everything you need to know to begin using these new spatial datatypes, and explains how to apply them in practical situations involving the spatial relationships of people, places, and things on the earth.

  • All of the spatial concepts introduced are explained from the ground up, so you need not have any previous knowledge of working with spatial data.
  • Every section is illustrated with code examples that you can use directly in SQL Server.
  • All of the topics covered in this book apply to all versions of SQL Server 2008, including the freely available SQL Server 2008 Express.


Alastair Aitchison has more than eight years of experience as a management information consultant, specializing in the design and deployment of online reporting systems. For the last three years, he has been employed as a reporting and analysis manager at Aviva, the world's fifth largest insurance group. In this role, he has championed the use of spatial data in corporate applications including the geographic analysis of risk patterns, plotting the success of regional marketing campaigns, and understanding the impact of major weather incidents. Alastair is a Microsoft Office Specialist Master Instructor and has delivered numerous training courses to individuals and small groups on a range of software packages.
Contents at a Glance5
Contents7
About the Author20
About the Technical Reviewer21
Acknowledgments22
Introduction23
Who This Book Is For24
How This Book Is Structured24
Prerequisites25
Downloading the Code25
Contacting the Author25
Defining Spatial Information27
What Is Spatial Data?27
Uses of Spatial Data27
Representing Features on the Earth28
Describing Positions Using a Coordinate System35
Applying Coordinate Systems to the Earth38
Using Spatial Reference Systems48
Spatial Reference Identifiers49
Spatial References in SQL Server 200849
Comparing Spatial Reference Systems52
Summary55
Implementing Spatial Data in SQL Server 200856
Understanding Datatypes56
Comparing Spatial Datatypes57
The geography Datatype58
The geometry Datatype63
Choosing the Right Spatial Datatype67
How Spatial Data Is Stored73
Converting Between Datatypes74
Spatially Enabling Your Tables75
Summary77
Working with Spatial Data in the . NET Framework78
What Is the . NET Framework?78
How . NET Is Hosted79
Why Use . NET for Spatial Functionality?81
Applying Principles of Object Orientation83
Instantiating Spatial Objects87
Invoking Spatial Instance Methods89
Accessing Properties91
Combining T-SQL and . NET CLR Methods92
Using Open Geospatial Consortium Methods93
Handling Exceptions in the CLR93
Summary96
Creating Spatial Data Objects99
Choosing an Appropriate Static Method99
Creating Geometries from Well- Known Text101
Creating Geometries from Well- Known Binary113
Creating Geometries from Geography Markup Language125
Summary135
Marking Out Geometries Using Virtual Earth136
Creating the Web Application137
Using the Web Application151
Creating a Geometry from the WKT Output153
Summary155
Importing Spatial Data157
Sources of Spatial Data157
Importing Tabular Spatial Data158
Importing Data from Keyhole Markup Language164
Importing Data from ESRI Shapefile Format168
Using Third- Party Conversion Tools174
Summary175
Geocoding176
What Is Geocoding?176
MapPoint Web Service177
Creating the . NET Assembly179
Compiling the Assembly189
Configuring the Database190
Importing the Assembly191
Creating the Function192
Using the Geocode Function193
Summary196
Syndicating Spatial Data198
Why Syndicate Spatial Information?198
Syndication Formats199
The GeoRSS Format201
Attaching Spatial Information to a Feed204
Creating a GeoRSS Feed205
Serving the GeoRSS Feed212
Testing the Feed Handler215
Consuming the GeoRSS Feed216
Summary223
Presenting Spatial Data Using Web Mapping Services224
The Application224
Process Overview225
Obtaining the Source Data228
Creating a New Web Site Project229
Creating the HTML Page229
Creating the Static JavaScript232
Creating the Stored Procedure245
Creating the Web Handler248
Viewing the Page261
Further Applications262
Summary264
Visualizing Query Results in Management Studio266
SQL Server Management Studio266
Visualizing Spatial Results266
Choosing Visualization Options268
Supported Projections269
Summary274
Examining Properties of Spatial Objects277
Returning the Name of a Geometry Type278
Returning the Number of Dimensions Occupied by a Geometry279
Testing Whether a Geometry Is of a Particular Type280
Testing Whether a Geometry Is Simple285
Testing Whether a Geometry Is Closed287
Testing Whether a LineString Is a Ring289
Counting the Number of Points in a Geometry291
Testing Whether a Geometry Is Empty292
Returning Cartesian Coordinate Values294
Returning Geographic Coordinate Values295
Returning Extended Coordinate Values296
Returning a Specific Point from a