Returns the spatial geometry of a trajectory object as a geometry value.
Syntax
geometry ST_trajectorySpatial(trajectory traj);
geometry ST_trajSpatial(trajectory traj);ST_trajSpatial is an alias for ST_trajectorySpatial.
Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object to extract geometry from. |
Examples
Get the geometry of a trajectory
The following example retrieves the spatial geometry of each trajectory in traj_table as Well-Known Text (WKT).
SELECT ST_AsText(ST_trajectorySpatial(traj)) FROM traj_table;Result:
st_astext
----------------------------------
LINESTRING(114 35,115 36,116 37)The returned LINESTRING represents the path of the trajectory across its recorded positions.
该文章对您有帮助吗?