This is a simple implementation of the LCSS Algorithm, written in php-cpp, in order to get better performance compared with a pure PHP implementation.
You can simply type make everything
and the extension will be installed.
However if any errors occur, you can do the following :
- Edit the Makefile and set
INI_DIR
to the directory that holds your additional.ini
files. make everything
LCSS( double epsilon [, double delta ] )
-
The constant epsilon is the matching threshold (value between 0 and 1)
-
The constant delta controls how far in time we can go in order to match a given point from one trajectory to a point in another trajectory.
double LCSS::findSimilarity( array trajectory1Lat, array trajectory1Lng, array trajectory2Lat, array trajectory2Lng )
- Currently Similarity Measures/ Similarity Function 1 is used.
The authors of the paper, suggest to find the minimal standard derivation between the two trajectories and use it as epsilon
,
while delta
should be around 20%-30% of trajectories length.