# Identify objects (bus) on the map based on coordinates (lat, lon) [closed]

Let's say I have an android app that frequently sends current GPS location of the user. If person is driving with bus, I can easily get GPS location of the bus and display it on the map and update it accordingly every 30 seconds.

Let's say that instead of one bus there are 3 buses driving along same route. My problem is to display real time location of every bus on the route. In this case there are X users on every bus all having my android application installed on their phones. Here is the picture that could represent the problem:

As you can see, every mobile application will send GPS location of the user to my server. Server receives and saves data.

Based on the server data I should create a web app that should display map whith position of every bus in real time.

One possible way to do this is to to try to cluster GPS data and based on clusters to conclude where is position of every bus. This approach has few problems:

• This algorithm could be slow if there is lot of data (then I can't update position of every bus every 30 seconds) Second problem is that
• I don't know number of clusters (buses). There might be 2, 3, 4 or N buses

Is there any other better approach to this problem?

## closed as too broad by Stephen Rauch, Toros91, Anony-Mousse, Dawny33♦Jul 27 at 6:16

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

You might build a logic of distance. This will raise an issue with buses passing each other. For curiosity, can't you identify source of signal?

To be honest, me thinking of same problem but from moving objects identifying (computer vision), so you can consider approaches out there.

Good luck.

Use kernel density estimation.

The points with maximum density are your potential bus/stop locations.

For KDE choose the radius so it suits your problem. For examples based on the extend of a bus, and the GPS uncertainty.

Then learn to distinguish these two cases next.