0
votes

I'm working on a python script whose goal is to detect if a point is out of a row of points (gps statement from an agricultural machine).

Input data are shapefile and I use Geopandas library for all geotreatments.

My first idea was to make a buffer around the 2 points around considered point. After that, I watch if my point is in the buffer. But results aren't good.

So I ask myself if there is a mathematical smart method, maybe with Scikit lib... Somebody is able to help me?

2
This is an example of a general problem called "outlier detection". A web search for that term will turn up lots of resources. Unfortunately most of what's out there is some kind of heuristic that works as long as the data continue to work the same as when the code was written, and when things change, as they do from time to time, you'll get mistaken results. But it's a lot of work to do better. A careful approach is to treat this as a problem in Bayesian inference, which see. Also, take a look at Gaussian process models.Robert Dodier

2 Answers

0
votes

try arcgis. build two new attributes in arcgis with their X and Y coordinate,then calculate the distance between the points you want

0
votes

Question is kinda vague, but my guess would be to find approximation/regression line (I believe, numpy.polyfit of 2nd degree) and take points with largest distance from line, probably with threshold relative to overall fit loss