A MultiPolygon instance is a collection of zero or more Polygon instances.
The illustration below shows examples of MultiPolygon instances.
As shown in the illustration:
-
Figure 1 is a MultiPolygon instance with two Polygon elements. The boundary is defined by the two exterior rings and the three interior rings.
-
Figure 2 is a MultiPolygon instance with two Polygon elements. The boundary is defined by the two exterior rings and the three interior rings. The two Polygon elements intersect at a tangent point.
The following example shows the creation of a geometry MultiPolygon instance and returns the Well-Known Text (WKT) of the second component.
DECLARE @g geometry;
SET @g = geometry::Parse('MULTIPOLYGON(((0 0, 0 3, 3 3, 3 0, 0 0), (1 1, 1 2, 2 1, 1 1)), ((9 9, 9 10, 10 9, 9 9)))');
SELECT @g.STGeometryN(2).STAsText();
This example instantiates an empty MultiPolygon instance.
DECLARE @g geometry;
SET @g = geometry::Parse('MULTIPOLYGON EMPTY');
Concepts
Polygon
Designing and Implementing Spatial Storage (Database Engine)
Other Resources
STArea (geometry Data Type)
STCentroid (geometry Data Type)
STPointOnSurface (geometry Data Type)
Help and Information
Getting SQL Server 2008 Assistance