O'Reilly logo

Pro Spatial with SQL Server 2012 by Alastair Aitchison

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  11

Aggregation and Combination

In this chapter, we'll look at various ways of combining spatial data. This could be, for example, collating a column of Points together into a single MultiPoint geometry (using UnionAggregate()) or joining two touching LineStrings together into a single LineString (using STUnion()). Combinations do not have to be additive; you can also, for example, subtract the area of space occupied by one Polygon from another, using STDifference(), or obtain the unique parts of two geometries using STSymDifference(). The common feature of all the methods discussed in this chapter is that they take two or more inputs and combine them in some way to produce a single output.

Creating a Union of Two Items of Spatial ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required