Click to Rate and Give Feedback
MSDN
MSDN Library
SQL Server
SQL Server 2008
Database Engine
Development
 MultiPolygon

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SQL Server 2008 Books Online (June 2009)
MultiPolygon

A MultiPolygon instance is a collection of zero or more Polygon instances.

The illustration below shows examples of MultiPolygon instances.

Examples of geometry 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');
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker