In older QGIS versions the Count Points in Polygon vector analysis tool had an "input vector layer attribute to aggregate" to perform a statistical analysis (sum, mean, min, max) on the counted points in a polygon.

However, in the newer QGIS (using version 2.18.6) this tool has disappeared. Only the counts in polygon is present in the vector analysis and you can't select the attributes of the point layer anymore to perform a statistical analysis. The tool now only counts the points in the polygon without any analysis.

Does anyone has a solution where to find the statistical attribute analysis?

figure = old count points in polygon with attribute selection


As you say, this feature is no more available from this processing tool.
But there is a tool that give you the opportunity to calculate SUM of Weight base on field value. It's called "Count Point fro Polygon (weighted)" processing tool.

Use the Weight field to calculate the SUM.

enter image description here

to get more statistics you should perform other actions :

  1. use Count Point in Polygon and get the number of point in a new column.
  2. with this two Colomn value you can calculate every stat you need from calculator.

Use ModelBuilder or script processing to get it in one action.

  • 1
    Thank you for this elegant solution. It's a pitty that the previous function is not available anymore. An extra motivation to dive into the ModelBuider. – Quake_K Nov 17 '17 at 8:54
  • your welcome, not a big deal to go throught ModelBuilder. please, don't forgot to mark my answer as you accepted it. – Hugo Roussaffa - GeoDatup Nov 20 '17 at 15:16
  • @Quake_K does this is the answer ? – Hugo Roussaffa - GeoDatup Nov 28 '17 at 13:21
  • So to know the mean value in a polygon one has to divide the weighted sum by the amount of points. Right ? – Quake_K Nov 29 '17 at 14:03
  • that's it, you right – Hugo Roussaffa - GeoDatup Nov 29 '17 at 14:24

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.