[Math] Finding the virtual center of a cloud of points.

computational geometry

Given:

  1. (latitude, longitude) points $P_1, P_2,\ldots, P_n$.
  2. Presumably, all the points should form a dense cloud. However, noise is possible.

Needed:

  • The virtual center of the points.

For instance, 99% of the points may lie within a circle with 1km radius, except for 1% scattered outside that circle at a distance larger than 1km from any point inside the circle. Then this 1% is noise.

Unfortunately, I do not know how to define the noise properly. But the virtual center I am looking for should be close enough to most of the points. If most of the points are close to it, then I do not mind that some be far away.

If it is not too hard, I would like to be able to recognize more than one dense cloud amongst the points. In which case, each cloud could be reduced to its virtual center and thus I will have to find the new virtual super center of the virtual center cloud. That super center is the final result.

I am not a mathematician, so my descriptions are vague. But I am pretty sure that this is a well known problem and it probably has a trivial solution.

Thanks.

P.S.

This question is similar to Detect Abnormal Points in Point Cloud, however, my space is two dimensional, which probably does not matter. Still.

EDIT

The points are indeed on the surface of a sphere, a spheroid actually, Earth more precisely. However, the distance between them is not large enough to take the Earth curveture into account, so it may be safely assume that the surface is flat and longitude is X and latitude is Y.

Best Answer

Just take the mean. The average of the x coordinates of the points will be the x coordinate of the center, and the average of the y coordinates of the points will be the y coordinate of the center.

Related Question