Creating algorithm for stops and routes recognition