I have a layer of village points and I want to limit the number of features rendered to a maximum of 50 points. I tried using Layer Properties > Labels > Rendering > Limit number of features to be labeled to 50. But this obviously limits only the labels, and not the points themselves, like in the image below:

enter image description here

I also tried Layer Properties > Style > Control feature rendering order but it does not seem to do anything about the limiting of the points rendered in the map. How can I limit the number of features to be rendered, preferably using an expression/the Field calculator (so that I can dynamically set the same for other similar layers)?

I am using QGIS 2.18.

  • Based on what criteria should features be filtered? Randomly?
    – Babel
    May 2, 2021 at 18:04
  • It could be chosen randomly, but I would also prefer the 50 villages with the highest population are shown. The layer has a column 'population' if that helps.
    – JAT86
    May 2, 2021 at 18:12

1 Answer 1


QGIS 3.x:

You can use the feature filter in layer properties -> source -> query builder:

enter image description here

E.g. use $id < 51 as expression to only show the first 50 features. Or use "population" > x to display only vilages with a population greater than x.

QGIS 2.x:

In QGIS 2.18 you can find the same menu in layer properties -> general -> query builder:

enter image description here

  • How can I do this in QGIS 2.18? I could not find "Source" in the Layer properties.
    – JAT86
    May 2, 2021 at 18:35

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.