I just started to work in QGIS and I'm new to GIS in general. I have a polygon layer map with some attributes assigned to the polygons. I also have a point layer with some cities that lie over the polygons. I think it should be straightforward to assign each point/city to one of the polygons (I have not done it yet but people told me that it is possible).

I would like to go one step further: is it possible to calculate an average of the polygon surrounding the point attributes?

The average could be done with something like a Gaussian kernel.

I insert an image to clarify:

enter image description here

What I would like to do is to average the three colored polygon values based on the red circle around the black dot I draw (the red circle could be the width of the Gaussian kernel). In this way the value I should obtain is a mix of the attributes and reflects the fact that this city lies close to the border of the polygon.

In normal image processing this task could be considered as applying a Gaussian kernel to an image and then select the attribute value in the pixel location where the city lies.

Is rasterization a good option?

  • Welcome to GIS.SE. What average values are we talking about? Also, have you considered that the city most likely is taken into account when it comes to the averages of the polygon it is within?
    – Erik
    Nov 12 '19 at 15:29
  • The values are indicators of wealth present in a certain region: what I would like to do is to consider the effects of neighboring regions. My guess is that the border between a poor region and a rich region is someway in the middle. Unfortunately I have data collected in polygonal areas, what I would really like to have are either data over a continous map or smaller polygons. Maybe I should wander why data were collected in that way...
    – spec3
    Nov 12 '19 at 15:50
  • Why do you suggest Voronoi polygons? they are still polygons and they do not have "smoothed" values... I don't know them very well though.
    – spec3
    Nov 12 '19 at 16:31
  • Have a look at the tools called join attributes by location and join attributes by location (summary).
    – csk
    Nov 12 '19 at 19:43

I think I found the solution, however Erik made a useful comment that I should consider. Everything with Qgis tools.

First, I should rasterize my polygons: Rasterise polygon layer using QGIS 3.0.3

Then I should smooth the layer using SAGA: QGIS Raster map, smoothing pixels

Finally, I should extract the values: Extracting raster values at points using Open Source GIS?

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.