SQL Server 2008 Books Online (October 2009)
MultiLineString

A MultiLineString is a collection of zero or more geometry or geography LineString instances.

Examples

The illustration below shows examples of MultiLineString instances.

Examples of geometry MultiLineString instances

As shown in the illustration:

  • Figure 1 is a simple MultiLineString instance whose boundary is the four endpoints of its two LineString elements.
  • Figure 2 is a simple MultiLineString instance because only the endpoints of the LineString elements intersect. The boundary is the two non-overlapping endpoints.
  • Figure 3 is a nonsimple MultiLineString instance because the interior of one of its LineString elements is intersected. The boundary of this MultiLineString instance is the four endpoints.
  • Figure 4 is a nonsimple, nonclosed MultiLineString instance.
  • Figure 5 is a simple, nonclosed MultiLineString. It is not closed because its LineStrings elements are not closed. It is simple because none of the interiors of any of the LineStrings instances intersect.
  • Figure 6 is a simple, closed MultiLineString instance. It is closed because all its elements are closed. It is simple because none of its elements intersect at the interiors.
Examples

The following example creates a simple geometry MultiLineString instance containing two LineString elements with the SRID 0.

DECLARE @g geometry;
SET @g = geometry::Parse('MULTILINESTRING((0 2, 1 1), (1 0, 1 1))');

To instantiate this instance with a different SRID, use STGeomFromText() or STMLineStringFromText(). You can also use Parse() and then modify the SRID, as shown in the following example.

DECLARE @g geometry;
SET @g = geometry::Parse('MULTILINESTRING((0 2, 1 1), (1 0, 1 1))');
SET @g.STSrid = 13;
See Also

Concepts

LineString
Designing and Implementing Spatial Storage (Database Engine)

Other Resources

STLength (geometry Data Type)
STIsClosed (geometry Data Type)

Help and Information

Getting SQL Server 2008 Assistance
Tags :


Page view tracker