I am running QGIS 1.8.0 on a 64-bit Windows 7 platform.

Given multiple points with different (but close) coordinates, how do I automatically create a new point that programmatically takes into consideration the various coordinates and determines the error radius of said point? The points represent the same object, but the coordinates were obtained from different sources.

I've used the measurement tool to document the max/min distance between the points, and drew ellipses around the group of points to visually annotate that they represent the same object, but I need to take this a stop further. The points are contained in various tables which can be joined using one of the columns if necessary.


  • 1
    I recommend reading about PostGIS and R – simpleuser001 Jan 3 '13 at 14:35
  • @simplexio, thank you for the recommendation. I've reviewed R a bit and although it is promising, I do not write code. I was hoping the community would be able to guide me to a plugin or a QGIS feature (that I have yet to discover) that would provide a solution. I am also hoping that since there are plenty of developers on here, someone may have already figured out how to do this! I will continue to read up on PostGIS, however, since it also provides various ways to manipulate data and there's plenty of examples that I can apply to other tasks I have. Thanks again for the info! – user1741329 Jan 3 '13 at 15:03
  • Could you please explain what you intend by "error radius" of a point? Are you trying in some sense to represent an estimate of uncertainty about its true location? If so, it would be useful to obtain quantitative metadata for each of the sources: you need to know the individual uncertainties (as a variance or its equivalent) in order to combine the coordinates properly, because it is usually the case that those uncertainties vary widely among your sources. (Otherwise, standard techniques--averaging and Student t confidence intervals--would work fine.) – whuber Jan 3 '13 at 17:43
  • @whuber, you are correct. I am trying to represent the level of uncertainty for the final location. As each source has varying levels of accuracy, I wanted to portray the location's most likely coordinates. The values certainly vary widely, as you noted. I've documented the variance (+- x meters), but how do I apply it? If merging the points is not possible, I'd like to provide a confidence region of where the point should be. – user1741329 Jan 3 '13 at 19:43


The short answer is that you take a weighted average of the coordinates to combine independent unbiased measurements of a given location. The weights are proportional to a particular quantitative expression of the precision of each measurement. The weights further determine confidence intervals for the coordinates. Those intervals can themselves be combined into a circular confidence interval around the averaged location.


Before getting to the details, let's be clear about the assumptions behind this solution. (They have been chosen to agree with typical metadata and to lead to simple calculations.) These are:

  1. The various measurements are truly independent of each other in a statistical sense. For instance, a set of coordinates lifted from a satellite image and another set from a ground-based GPS reading would qualify: their temporal and physical independence provide grounds for assuming statistical independence. As an example of lack of independence, consider two GPS readings obtained in quick succession. Correlation of errors with time suggests any errors in those GPS readings would be correlated as well.

  2. The measurements are unbiased. This means that (in principle) if you had the opportunity to obtain many independent replicates of a measurement, then on average it would be correct. Intuitively, it means that no systematic error has been built into the measurement process. GPS readings should be unbiased. Locations from satellite photographs might have some bias unless the photos have been orthocorrected (elevation creates the bias).

  3. The two coordinate measurements (x and y) are statistically independent. This is rarely the case, but usually has to be taken as a convenient approximation, for otherwise you need to know the covariance of the measurements (which is directly related to their correlation). If you do know the covariance, then you can use a generalization of the methods described here to obtain an elliptical confidence region for the location.

  4. A "confidence region" is a procedure--like the one described below--that takes a set of location measurements and outputs a shape on a map, the confidence region. It is designed to have two properties. First, you--the consumer of this region--get to specify an error rate, often taken to be around 5% to 10% (but never 0%: that would lead to useless confidence regions). This is the rate at which the shape would fail to cover the true location, if you (hypothetically) had the opportunity to re-take all the measurements and recompute the confidence region, again and again and again. We can fairly say, for instance, that a 95% confidence region is one that was produced by a procedure with a 95% chance of covering the true location. (The subtle point here is that the confidence region you actually produce either covers the true location or it doesn't, so it is potentially misleading to say that the true point has a "95% probability" of being in the region.)


You want to look for accuracy statements in the metadata. Ultimately, they often read something like

we believe that x% of the points in the data we have delivered will be within y meters of their true locations.

It is almost always the case that such statements were derived through the following two-step procedure. You will need to back it up one step to get the information you need:

  1. Various points were sampled randomly from the dataset and compared to known locations. On average they were found to be accurate, so the observed discrepancies were summarized by a "root mean square" deviation, the RMS.

  2. The RMS was multiplied by a number, t, related to the "x%" in the statement. The relationship is obtained by assuming that the measurement errors have a bivariate normal distribution and are independent (as previously described).

    If you can obtain the RMS from the metadata, that's great. Otherwise you can come up with a reasonable guess by dividing the "y meters" in the accuracy by t. This is usually obtained from the 1-x quantile of the chi-square distribution with two degrees of freedom. Look this up in a table or with an applet. For example, with x = 95%, the quantile is 5.991; with x = 90%, the quantile is 4.605. Take the square of the accuracy, written y^2, and divide it by this value to obtain the coordinate error variance.

    As an example, if your metadata claim that 90% of the points are expected to lie within 50 m of their true locations, then

    • x = 90%, so 1 - x = 0.10 and t = 4.605.

    • y = 50m, so y^2 = 50*50 = 2500.

    • y^2 / t = 543. (These are square meters, not meters.)

  3. The precision of the coordinate measurements is the reciprocal of their error variance.

    • 1 / 543 = 0.00184 is the precision in this example.
  4. Separately for each coordinate, compute the weighted average, using the precisions as weights.

    Continuing the example, suppose we have another dataset whose metadata assert that x = 95% of the points are within y = 25 meters of their true locations. Proceeding as before, we compute that its precision is 5.991 / 25^2 = 0.009586. (This is almost five times greater than the other dataset.) Consider a point P whose coordinates in the first dataset are given as (1000, 2000) and in the second dataset as (990, 2050):

    • Combine the x-coordinates by forming the weighted average of 1000 (with a weight 0f 0.00184) and 980 (with a weight of 0.009586):

      x = (0.00184 * 1000 + 0.009586 * 980) / (0.00184 + 0.009586) = 983

    • Combine the y-coordinates by forming the weighted average of 2000 and 2050:

      y = (0.00184 * 2000 + 0.009586 * 2050) / (0.00184 + 0.009586) = 2042.

    (As a check, notice how the combined values are five times closer to the measurements in the second dataset than to the first. For instance, 2050 - 2042 = 8 meters and 2042 - 2000 = 42 meters, about five times 8 meters.)

    The best place to plot the point is at (x, y).

  5. To obtain the precision of (x, y), sum the precisions (weights) used to calculate it. In our running example, the precision equals .00184 + .009586 = .01143. We can translate this into more intuitively meaningful values. First, its reciprocal 1 / .001143 = 87.5 is the coordinate error variance (in square meters!). Its square root, sqrt(87.5) = 9.3 meters, is the amount by which you expect each coordinate to differ from the correct value. Let's call this the "combined measurement error."

  6. You could stop here if you wish (and simply report the combined measurement error), but to draw confidence circles, reverse your early steps: pick any x you like (between 0% and 100%) and find the corresponding percentile of the chi-square distribution (with two degrees of freedom). For example, if you want to use x = 80%, you would find t = 3.219. Multiply the combined measurement error by the square root of this value. E.g., 9.3 meters * sqrt(3.219) = 17 meters. That's the radius to use for the circle. Center it--of course--at the point (x,y).

This procedure produces a circle that has an 80% chance of covering the correct location. A nearly equivalent interpretation is that when you draw many such combined locations and their confidence circles on a map, then--under all the assumptions previously listed--we may conclude that approximately 80% of those circles cover the correct locations (and, therefore, the remaining 20% of the circles do not cover the correct locations). However, we don't know which of the circles are the incorrect 20%!

Everything generalizes in the obvious way when combining more than two (independent) datasets: the weighted mean is a sum of weighted coordinates all divided by the sum of the weights and the final precision is the sum of all the component precisions.

Notice that the weights are attributes of the datasets rather than of individual points. Thus, all the radii will be the same and the calculation of the combined datapoints becomes particularly simple: each x coordinate is multiplied by the weight for the dataset it comes from; these products are summed; and that sum is divided by the sum of weights (which is a constant). The same is done for the y-coordinates. The resulting (x,y) coordinates are used to plot the combined points and to locate the fixed-sized confidence circles.

  • 1
    Wow, this is a great response! I really appreciate you taking the time to provide a thorough explanation (and examples). I do not have accuracy statements as would be noted in metadata (I collected the points), so I will use the alternate method you noted. I do not know the true locations of the points other than what was reported by the GPS, and that also has a level of inaccuracy. This type of method is exactly what I was looking for and I look forward to applying it to my data sets. Thanks for teaching me something new about geospatial analysis! I hope others will benefit from this as well. – user1741329 Jan 4 '13 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.