Returns true if the portion of the trajectory within the specified time range is spatially equal to the specified geometry object. Spatial equality is topological: two geometries are spatially equal if they occupy the same point-set, regardless of vertex order or intermediate points.
Syntax
boolean ST_equals(trajectory traj, tsrange range, geometry g);
boolean ST_equals(trajectory traj, timestamp t1, timestamp t2, geometry g);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object. |
range | The time range. |
t1 | The start time. |
t2 | The end time. |
g | The specified geometry object. |
Examples
The following example checks whether the path traced by the trajectory between 13:00 and 14:00 on January 1, 2010 is spatially equal to the given linestring. The result is false for each row in traj_table.
Select ST_equals(traj, '2010-1-1 13:00:00', '2010-1-1 14:00:00', 'LINESTRING(0 0, 5 5, 9 9)'::geometry) from traj_table;Output:
st_equals
-------------
f
f该文章对您有帮助吗?