I’m trying to create a bounding box around a set of coordinates, but I want to ‘focus’ on groups of coordinates and ignore any that are way off and would mess up the map. (Imagine a map of 10 spots on a city and 1 somewhere in another country)
What would be the best way to build the top-left and bottom-right values?
First I would determine your criteria for “fringe locations”
Something like “outside 2 σ” then you just need to calculate your mean in both dimensions and draw your lines at 2σ. If you want some curvy boundary then things get much more complicated… Start at your criteria and move forward from there.
So let’s assume you wanted to exclude things more than 2σ from the mean
You need to calculate:
σ(x), σ(y), mean(x), mean(y)
Then your upper left bound is ( mean(x)-2σ(x) , mean(y)+2σ(y) )
and your lower right bound is ( mean(x)+2σ(x) , mean(y)-2σ(y) )
this will yield a rectangle for 2σ in both dimensions. For a circle things will get a bit more complicated… start with defining you “acceptable region”