Feature Description
Linear trajectory dataset similarity measure uses a search dataset to find the trajectory most similar to the search trajectory from the trajectory dataset. It returns the trajectory data most similar to the search trajectory. The result dataset will retain all property fields of the trajectory data and add "QueryFeatureID", "SimilarityFeatureID", and "Similarity" fields. The "QueryFeatureID" field indicates the feature field value of the search trajectory object; the "SimilarityFeatureID" field indicates the feature field value of the result trajectory object; and the "Similarity" field indicates the similarity or distance between trajectories. All point objects belonging to a single trajectory queried for the same search object will have the same similarity value.
Provided trajectory similarity measure methods include:
- Hausdorff Distance: A shape-based metric that determines similarity by calculating the maximum of the closest point distances between two trajectories, under the condition that the number of points in the two trajectories cannot differ too much.
- Fréchet Distance: Based on the idea of dynamic programming for trajectories, similar to dog-leash distance. It determines similarity by calculating the longest distance between corresponding positions of two trajectories at the same time, and is relatively sensitive to noise.
- Dynamic Time Warping (DTW): A point-based metric with no restrictions on trajectory length and good performance, but it is sensitive to noise.
- Max Similar Length: This method includes a time constraint, only searching for trajectories within the same time period as the search trajectory.
Parameter description
| Parameter Name | Default Value | Parameter Interpretation | Parameter Type |
|---|---|---|---|
| Linear Trajectory Dataset | The trajectory dataset from which to find the trajectory most similar to the search trajectory. It must be a line dataset and must have a unique Feature ID. | FeatureRDD | |
| Search Dataset | Used as the reference dataset to find the trajectory most similar to the search trajectory from the trajectory dataset. It must be a line dataset and must have a unique Feature ID. | FeatureRDD | |
| Trajectory Similarity Measure Method (Optional) |
Max Similar Length | Trajectory similarity measure method. Refer to the feature description for details. | JavaSimilarityAlgorithm |
| Number of Most Similar Trajectories to Return (Optional) |
5 | Number of the most similar trajectories to return. Must be greater than 0. | Int |
| Spatial Distance Tolerance (Optional) |
50 meters | If the trajectory measure method is Max Similar Length, the spatial distance tolerance represents the maximum error distance between two points, meaning if the distance between two points is greater than the tolerance value, they cannot be considered similar. For other trajectory measure methods, the tolerance represents the error of the minimum bounding rectangle of the trajectory object. That is, if the minimum bounding rectangles of two trajectories intersect within the tolerance error, the distance between the trajectories is calculated; otherwise, it is not. | JavaDistance |