Skip to content

ST_M

Returns the M (measure) coordinate of a Point geometry.

Usage

double ST_M(geom: geometry)

Arguments

  • geom (geometry): Input geometry

Description

Extracts the M (measure) coordinate from a Point geometry or geography. Returns NULL if the geometry has no M dimension or for non-point geometries.

Examples

SELECT ST_M(ST_PointM(1.0, 2.0, 42.0));
┌────────────────────────────────────────────────────┐
│ st_m(st_pointm(Float64(1),Float64(2),Float64(42))) │
│                       float64                      │
╞════════════════════════════════════════════════════╡
│                                               42.0 │
└────────────────────────────────────────────────────┘
SELECT ST_M(ST_Point(1.0, 2.0));
┌───────────────────────────────────────┐
│ st_m(st_point(Float64(1),Float64(2))) │
│                float64                │
╞═══════════════════════════════════════╡
│                                       │
└───────────────────────────────────────┘