MySQL 5.1 リファレンスマニュアル :: 16 Spatial Extensions :: 16.5 Analyzing Spatial Information :: 16.5.2 Geometry Functions :: 16.5.2.4 MultiLineString Functions
« 16.5.2.3 LineString Functions

16.5.2.5 Polygon Functions »
Section Navigation      [Toggle]
  • 16.5.2 Geometry Functions
  • 16.5.2.1 General Geometry Functions
  • 16.5.2.2 Point Functions
  • 16.5.2.3 LineString Functions
  • 16.5.2.4 MultiLineString Functions
  • 16.5.2.5 Polygon Functions
  • 16.5.2.6 MultiPolygon Functions
  • 16.5.2.7 GeometryCollection Functions

16.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 |
    +------------------------------+
    
Copyright © 1997, 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices
Top / Previous / Next / Up / Table of Contents
© 2010, Oracle Corporation and/or its affiliates