# Understanding the concept of m value

As far as I understand, the m value "is a measured distance along a route" (similar answers here), thus similar to the mileage of a car driving over a highway. The m value defines the point on a line as the distance from a set starting point. So the m-value, even if not explicitely set, is somehow inherent in the very geometry of the line feature, defined as the distance from the first vertex of the geometry. Thus, every point of the line (not only vertices) has a well defined m value - comparable to an x and y coordinate, even if these are explicitely defined only for the vertices, not the points on the segments between vertices.

However, with a look at the QGIS documentation, I am confused. The image to explain the `Filter vertices by M value` function there shows a line with 5 vertices, with m-values in this order: 0, 11, 5, 12, 8. This would correspond to the mileage going up and down, so something is wrong.

How is this possible if the route is measured from the start point of the line? Or did I misunterstand the concept and the m value relates only to the neighboring vertex, not to the start point of the geometry?

• I always thought I could stuff any value I liked in there, there is an assumption I can interpolate along the line segments between point values but I don't think that can be enforced. Jan 27, 2021 at 16:12
• `M` for Mesure ? And store a value information in the coordinates without attributes table. Maybe. Jan 27, 2021 at 17:17
• Everything is fine with the QGIS example. Related: postgis.net/workshops/postgis-intro/3d.html you can look at the points composing your line as POINTM ;) Jan 28, 2021 at 1:28