Function: Extract stay points from a GPS log file and display them in a map generated by folium.
Usage:
python3 stayPointDetection_basic.py
python3 stayPointDetection_density.py
There are two versions of stay point detection algorithm: stayPointDetection_basic.py and stayPointDetection_density.py, both described in the overview [1].
We use Geolife Trajectories 1.3 public datasets as test data.
Full test data could be downloaded from: https://www.microsoft.com/en-us/download/confirmation.aspx?id=52367
stayPointDetection_basic.py
: Implementation of algorithm in [2], having some boundaries modified to get more accurate results.
stayPointDetection_density.py
: Implementation of algorithm in [3], also having some places modified.
Results
yellow: all trajectory points
blue: stay points
red: centre of stay points
[1] Zheng Y . Trajectory Data Mining: An Overview[J]. ACM Transactions on Intelligent Systems and Technology, 2015, 6(3):1-41.
[2] Q. Li, Y. Zheng, X. Xie, Y. Chen, W. Liu, and W.-Y. Ma, "Mining user similarity based on location history", in Proceedings of the 16th ACM SIGSPATIAL international conference on Advances in geographic information systems, New York, NY, USA, 2008, pp. 34:1--34:10.
[3] Jing Yuan, Yu Zheng, Liuhang Zhang, XIng Xie, and Guangzhong Sun. 2011. Where to find my next passenger. In Proceedings of the 13th international conference on Ubiquitous computing (UbiComp '11). Association for Computing Machinery, New York, NY, USA, 109–118.