I'm new in QGIS (and GIS in general). I posted a screenshot to help you understand my question.

I have data from 3 different runs measuring air quality in the streets shown in the screenshot. As you can see, there is some overlap between the runs, and they are not exactly the same, as this is impossible to achieve using a phone GPS.

What I want to do is to aggregate the data based on location, in order to end up with one set of data which follows the route I took during sampling. What I'm thinking is somehow to take one point on the route every, say, 10 meters, and aggregate the data points that are the closest to one specific point based on an average or distance weighted average.

The end result I am looking for is an average of the 3 runs in 1 run.

Is there anyway to achieve this? Or a workaround that would provide something similar?



You may try the interpolation tool. This can be found at Raster-Interpolation-Interpolation. It is found at the Raster-Functions but uses points as input. The output will be a raster though.

First you should merge your 3 runs to one point-file with the Merge tool from the Vector menue.

Within the interpolation tool you can set your data-field where you have your air-quality values stored in your merged point-file. On the right side you can set the output-raster and method. There you can for example use the 10m as the size of your cells. It will then interpolate between all the datapoints. The output is a raster, but that can be transformed to points again if needed.

The transformation to back to points can be done with the processsing environment where you have the SAGA-Gis tool "grid values to points" or the Grass tool "r.to.vecor".

Not sure if the output fits your needs because your routes may be farther away from eacher other in some spots. On this spots you also get stronger interpolated values. Also the Output will not be directly on one of your routes.

  • I tried using the interpolation tool, however, the result was a rectangular image with the interpolated data. Changing the color style to traffic light, it looked like a greenish rectangle with some red along the route that I sampled. Is there a way to add a screenshot in comments? – John Awad Apr 14 '16 at 12:44
  • That output is correct, as all raster are rectangles. The green parts are where there is a zero, or really low value in the raster, as it did not have something to interpolate there. When you set the green values to no-color it will only show you the route data. For visualisation that may be enough. If you transfer the raster to points you will also have lots of points outside your route. Just delete the ones with the zero values. – Matte Apr 14 '16 at 13:39
  • Can you explain how exactly do I transform the raster back to points? I'm not sure I understood it in your original answer. – John Awad May 3 '16 at 10:18

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.