Usman
Usman

Reputation: 2890

How to group GPS Coordinates to represent One specific GPS Location (Data Mining)

I have a scenario: I have the data of some GPS Tracks( longitudes, latitudes ) and these are contained in 2 parts

First part containing the data (Longitudes and Latitudes) which are the journey stations (These are actual coordinates and they must be visited when the bus starts its journey)

Second Part containing the GPS coordinates (Longitude and Latitude) but probably 2 times more then 1st part. Everytime when bus starts its journey, it stops these station (of whome coordinates have been given). I want to compare that bus completed its journey Or not by comparing its visited GPS stations (realtime coordinates) with the first part (schedualed Coordinates).

But My Problem:

I have almost double coordiantes in the second part and all those are very very close with each other and almost 5-8 coordinates represents the same station..( e.g 104578,105888 ) and ( 104579,105890 )

What would be the right and possible way to declare that certain no of coordiantes are representing the same station. This problem probably can be solved out using K Nearest Neighbour or K Means somehow.

This problem seems to be not well defined..But I think on query I would try to explain more.

Upvotes: 0

Views: 1176

Answers (3)

Has QUIT--Anony-Mousse
Has QUIT--Anony-Mousse

Reputation: 77474

Have you consider using a simple thresholding approach? i.e. merge coordinates withing a certain distance? It seems as you are very well able to choose such a threshold.

The problem with clustering is that it will try to discover structure in your dataset.

What you seem to be interested in, is simple merging of objects that are within a certain distance. There is no "structure" that you want to discover. You want to do preprocessing, not clustering.

Upvotes: 0

Cybercartel
Cybercartel

Reputation: 12592

You can use a spatial index with lat lng pairs. Then you can look for close points on the curve and group them together. A spatial index is often a space filling curve or a quadtree. It uses a quadkey to index the 2 dimension and reduce it to 1 dimension. It also preserve some spatial information and can be use for many things. Read more about it in Nick's spatial index quadtree hilbert blog.

Upvotes: 1

Sebastian Cabot
Sebastian Cabot

Reputation: 1822

Create a convex hull polygon of the second part coordinates maybe with a buffer so it takes a larger area so you can account for GPS errors and do point in polygon search.

Or just use radius distance with the scheduled point as the center.

Upvotes: 0

Related Questions