2

I have to layers, one point one polygon (with 6 areas) stored as shapefiles. Now I want to count the number of points in each area and write it into the attribute table of the polygons. A column sum_poi already exists.

Can I use the field calculator to populate the column in the polygon layer?

Thanks for your help.

1 Answer 1

3

It is not that easy. You have to use Vector -> Analysis Tools -> Points in Polygons.

That will create a new layer with an additional attribute column with the numer of points inside each polygon.

See this tutorial for assistance:

http://www.qgistutorials.com/en/docs/points_in_polygon.html

2
  • Thanks. But this solution creates a completely new layer. There is no possibility to write it into the existing shapefile?
    – hoge6b01
    Commented Jan 13, 2014 at 10:42
  • You can remove the old layer, then Save As ... the new one to the name of the original shapefile.
    – AndreJ
    Commented Jan 13, 2014 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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