# Finding outlier point in set of points, by distance, using QGIS?

I need to identify and eliminate the outlier points in a set of points, as depicted below. It seems a simple task, but I cannot find the answer anywhere.

I suspect that the proper way to go is through a density analysis. But I cannot figure out.

I am using QGIS.

• There are some cluster analysis tools that can come handy. I suggest you to edit the question with the technology you are using. – JGH Sep 3 '17 at 18:04
• Done! Thanks. I am using QGIS. As my data set has 500K point grouped in 5,000 sets, I will need to resolve this problem in Python, as I will have to replicate this 5,000 times, for each set of points. – Roberto Lopez Sep 3 '17 at 19:50
• Sketch for a minimal solution: (1) triangulate the point cloud; (2) calculate the average distance A and the corresponding standart derivation S from all triangle edges. (3) remove egdes larger than A+S*m, while m is a skalar like (1.5, 2,...) see Normal distribution, standart derivation and coverage, (4) remove points not connected to main group – huckfinn Sep 3 '17 at 20:39
• @huckfinn your solutions sounds good. As an alternative to the "abnormal distance" that you suggest, I was thinking that an "abnormal density" may even be more simple: outlier points will always be in a cell with a density of 1 or 2. – Roberto Lopez Sep 4 '17 at 16:07
• For a simple cell based approach you could work with quadtrees. Quadtrees going into the direction of @JGH in terms of spatial clustering. Please refer to GIS.SE:5394. – huckfinn Sep 5 '17 at 9:07