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'); |