I have a GPX file with track points and I want to average the points spatially to improve accuracy of the point feature. I can't just make a polygon and find its centroid as the number of overlapping points in a certain location should "weight" the result more than another location with few points. ie. if the field data collector was standing in one spot for 2 minutes I should have the bulk of points 'drifting' around the likely location of the point, and have scattered outliers around that, by averaging spatially based on all the points the outliers would be discounted in favour of the clustered points in the averaging.
Do I have to make a raster grid with small resolution and overlay it on my points and then count the points in each cell, or is there an easier geoprocessing kind of function to simply tell me the center coordinates (or make a new point) for the average center?
Best Answer
Edit to discount outliers: Here is one way to discount outliers using inverse distance weighting. In this approach, points that have a small, average distance to other points will have a higher weight, and more influence on the mean point's location.
Create a distance matrix with summary stats that describe the point separations:
Join the distance matrix to your points layer:
Once they are joined, calculate inverse distance. This will be used to weight the mean point:
Run mean coordinates with inverse mean distance as the weighting field:
The result will be a mean location in which the points that are on average far away from other points will have been discounted.