# Interpolation of data points

I have a layer of points that represent bus stops. Each point has a value (quality of service, between `0` and `100`). I need to create a grid (resolution `25m`) by interpolating the points values.

For each cell of the grid, I want to assign the value of the best surrounding stop (search radius of `500m`), but the values of the stops should decrease linearly with the distance between them and the grid cell (`-10%` every `100m`).

For example, a grid cell located `100m` away from a stop with value `30` and `200m` away from another stop with value `80` should have the value `64` (`80 - 0.2*80`). The bus stop with the bad value `30` has no impact on this cell.

I tried IDW interpolation but I'm not getting the result I expect. I'm using QGIS.

• In order to make it more complicated: How do you account for natural or artificial barriers, e.g. highways, or rivers?
– Erik
Mar 25, 2019 at 11:09
• Actually I don't ;) Mar 25, 2019 at 11:11
• If you don't, then both scientific and practical value of your map are at least to be doubted.
– Erik
Mar 25, 2019 at 11:23
• May be a possibility, but i don't have try, and not a lot elegant.. : 1. Create a grid (point with a distance of 25 m) 2. Calculate a distance matrix (N*kx3) betwen bus points and grid. 3. Join quality of service in the distance matrix. 4. Calculate a new field with something like CASE WHEN "Distance"<500 then "bus_stops_quality" -("Distance" * "bus_stops_quality" /1000) ELSE 0 END. 4.Join atttributes by location, select max values. Mar 25, 2019 at 14:19
• Thank you Christophe, your solution is very interesting and suits my needs. I'm currently testing it. Could you develop how to select only the max values for each grid point ? Is it something you do during the attributes joining by location or an other step that you do after? Mar 25, 2019 at 16:17