I have a series of points with various fields in the attribute table such as car_id, time etc.,

I've created a hexagon vector grid, I want to count how many unique car_id's occur in one of the hexagon polygons.

Essentially a step further than points in polygon, if there are multiple points in a polygon where car_id = 25, the car_id = 25 would be counted once. The car_id count for a polygon using the sample data below would be 4

car_id = 25
car_id = 25
car_id = 25
car_id = 22
car_id = 22
car_id = 23
car_id = 24 

My question is what is the most appropriate QGIS tool to achieve this? Would it be Count Unique Points in Polygon, in the processing toolbox?

  • I have exactly the same question. But unfortunately the "Count Unique Points in Polygon" tool is not available anymore in QGIS 3 (I'm using QGIS 3.10). Do you know an alternative method?
    – winecity
    Feb 10, 2020 at 15:15

1 Answer 1


Your guess is correct - use 'Count Unique Points in Polygon' in the processing toolbox, using "car_id" as the "Class field".

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.