# ST_IsMeasured function

The ST_IsMeasured function takes a geometry as an input parameter. If the given geometry has M coordinates (measures), it returns 1. Otherwise, it returns 0 (zero).

If the given geometry is null or is empty, then null is returned.

This function can also be called as a method.

## Syntax

## Parameter

- geometry
- A value of type ST_Geometry or one of its subtypes that represents the geometry to be tested for the existence of M coordinates (measures).

## Return type

INTEGER

## Example

In this example, several geometries
are created with and without Z coordinates and M coordinates (measures).
ST_IsMeasured is then used to determine which of them contained measures.

```
SET CURRENT FUNCTION PATH = CURRENT FUNCTION PATH, db2gse
CREATE TABLE sample_geoms (id INTEGER, geometry ST_Geometry)
INSERT INTO sample_geoms VALUES
(1, ST_Geometry('point EMPTY',0))
INSERT INTO sample_geoms VALUES
(2, ST_Geometry('polygon((40 120, 90 120, 90 150, 40 150, 40 120))' ,0))
INSERT INTO sample_geoms VALUES
(3, ST_Geometry('multipoint m (10 10 5, 50 10 6, 10 30 8)' ,0))
INSERT INTO sample_geoms VALUES
(4, ST_Geometry('linestring z (10 10 166, 20 10 168)',0))
INSERT INTO sample_geoms VALUES
(5, ST_Geometry('point zm (10 10 16 30)' ,0))
SELECT id, ST_IsMeasured(geometry) Is_Measured
FROM sample_geoms
```

Results:

```
ID IS_MEASURED
----------- -----------
1 0
2 0
3 1
4 0
5 1
```