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.

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

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

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.