M takes a point and returns its measure.
Syntax
db2gse.M(p db2gse.ST_Point)
Return type
Double
Examples
The following CREATE TABLE statement creates the M_TEST table. M_TEST has two columns: the GID integer column, which uniquely identifies the row, and the PT1 point column, which stores the sample geometry.
CREATE TABLE M_TEST (gid integer, pt1 db2gse.ST_Point)
The following INSERT statements insert a row that contains a point with measures and row that contains a point without measures.
INSERT INTO db2gse.M_TEST VALUES(1, db2gse.ST_PointFromText('point (10.02 20.01)', db2gse.coordref()..srid(0))) INSERT INTO db2gse.M_TEST VALUES(2, db2gse.ST_PointFromText('point zm(10.02 20.01 5.0 7.0)', db2gse.coordref()..srid(0)))
In the following SELECT statement and the corresponding result set, the M function lists the measure values of the points. Because the first point does not have measures, the M function returns a NULL.
SELECT gid, db2gse.M (pt1) "The measure" FROM M_TEST GID The measure ----------- ------------------------ 1 - 2 +7.00000000000000E+000 2 record(s) selected.