geo-registry

Count Points In Polygon

Adds to each polygon the number of points that fall inside it.

Pitfall. Points exactly on a shared boundary are counted in both polygons by some engines and in one by others.
About this operation
Also called point count, points in polygons, Summarize Within (count)
Group vector/joins
Checks crs.agreement, join.unmatched
Pitfalls 1 listed above
Columbus tool Not stated
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
field string no Not stated Not stated Name of the new count attribute.

Inputs and outputs

Direction Name Type Geometry Note
Input polygons vector polygon Not stated
Input points vector point Not stated
Output output vector polygon Not stated

In each engine

Engine Tool Parameters Differences
grass v.vect.stats
  • field → count_column
  • polygons → areas
  • points → points
  • Writes the count into the areas map's own attribute table; there is no separate output. method and stats_column add other statistics of a points column.
qgis native:countpointsinpolygon
  • field → FIELD
  • polygons → POLYGONS
  • points → POINTS
  • output → OUTPUT
  • CLASSFIELD counts distinct values of a field instead; WEIGHT sums a field.