ST_MultiLineString data type

The ST_MultiLineString data type is a collection of ST_LineStrings. ST_MultiLineStrings are used to define streams or road networks.

Properties

ST_MultiLineStrings are simple if they only intersect at the endpoints of the ST_LineString elements. ST_MultiLineStrings are nonsimple if the interiors of the ST_LineString elements intersect.

The boundary of an ST_MultiLineString is the non-intersected endpoints of the ST_LineString elements. The ST_MultiLineString is closed if all its ST_LineString elements are closed. The boundary of a ST_MultiLineString is NULL if all the endpoints of all the elements are intersected. In addition to the other properties inherited from the superclass ST_Geometry, ST_MultiLineStrings have length.

The following figure shows examples of ST_MultiLineStrings:
  • (1) is a simple ST_MultiLineString whose boundary is the four endpoints of its two ST_LineString elements.
  • (2) is a simple ST_MultiLineString because only the endpoints of the ST_LineString elements intersect. The boundary is two non-intersected endpoints.
  • (3) is a non-simple ST_MultiLineString because the interior of one of its ST_LineString elements is intersected. The boundary of this ST_MultiLineString is the three non-intersected endpoints.
  • (4) is a simple non-closed ST_MultiLineString. It is not closed because its element ST_LineStrings are not closed. It is simple because none of the interiors of any of the element ST_LineStrings intersect.
  • (5) is a simple closed ST_MultiLineString. It is closed because all its elements are closed. It is simple because none of its elements intersect at the interiors.
    Figure 1: Examples of ST_MultiLineString objects

    (1) is two lines that do not touch. (2) is two lines that touch at an end point. (3) is two lines that intersect at the end of one line and the middle of the other. (4) is a polygon. (5) is two polygons.

Functions

The following functions operate on ST_MultiLineStrings:
ST_Length()
The function returns the cumulative length of all its ST_LineString elements as a double-precision number.
ST_IsClosed()
The function returns t (TRUE) if the ST_MultiLineString is closed and f (FALSE), otherwise.