IsMeasured takes a geometry object and returns 1 (TRUE) if the object has measures; otherwise it returns 0 (FALSE).
Syntax
db2gse.IsMeasured(g db2gse.ST_Geometry)
Return type
Integer
Examples
The following CREATE TABLE statement creates the MEASURE_TEST table, which has two columns. The GID column uniquely identifies the rows, and the G1 column stores the point geometries.
CREATE TABLE MEASURE_TEST (gid smallint, g1 db2gse.ST_Geometry)
The following INSERT statements insert two records into the MEASURE_TEST table. The first record stores a point that does not have a measure. The second record's point does have a measure.
INSERT INTO MEASURE_TEST VALUES(1, db2gse.ST_PointFromText('point (10 10)', db2gse.coordref()..srid(0))) INSERT INTO MEASURE_TEST VALUES (2, db2gse.ST_PointFromText('point m (10.92 10.12 5)', db2gse.coordref()..srid(0)))
The following SELECT statement and corresponding result set show the GID column along with the results of the IsMeasured function. The IsMeasured function returns a 0 for the first row because the point does not have a measure. It returns a 1 for the second row because the point does have measures.
SELECT gid, db2gse.IsMeasured (g1) "Has measures?" FROM MEASURE_TEST gid Has measures ------ ---------- 1 0 2 1