|
18.5.2.4. MultiLineString Functions
-
GLength(mls )
Returns as a double-precision number the length of the
MultiLineString value
mls . The length of
mls is equal to the sum of the
lengths of its elements.
mysql> SET @mls = 'MultiLineString((1 1,2 2,3 3),(4 4,5 5))';
mysql> SELECT GLength(GeomFromText(@mls));
+-----------------------------+
| GLength(GeomFromText(@mls)) |
+-----------------------------+
| 4.2426406871193 |
+-----------------------------+
GLength() is a non-standard name. It
corresponds to the OpenGIS Length()
function.
-
IsClosed(mls )
Returns 1 if the MultiLineString value
mls is closed (that is, the
StartPoint() and
EndPoint() values are the same for each
LineString in
mls ). Returns 0 if
mls is not closed, and –1
if it is NULL .
mysql> SET @mls = 'MultiLineString((1 1,2 2,3 3),(4 4,5 5))';
mysql> SELECT IsClosed(GeomFromText(@mls));
+------------------------------+
| IsClosed(GeomFromText(@mls)) |
+------------------------------+
| 0 |
+------------------------------+
|
|