Skip to main content
This function checks if a geometry is a valid trajectory representation. For a trajectory to be considered valid, it must be a LineString that includes measure (M) values. The key requirement is that the M values increase from one vertex to the next as you move along the line. ST_IsValidTrajectory

Signatures

ST_IsValidTrajectory(geom: Geometry)

Parameters

geom
Geometry
required
The input geometry.

Return type

Returns true or false.

Examples

SELECT ST_IsValidTrajectory(
               ST_GeomFromText('LINESTRING M (0 0 1, 0 1 2)')
)
true
SELECT ST_IsValidTrajectory(
               ST_GeomFromText('LINESTRING M (0 0 1, 0 1 0)')
)
false