3

I'm working with a point layer (many many features) that has some attributes, like the elevation of each point.

I created a polygon grid (5 km x 5 km each cell) with an unique ID and I made an intersection of the point with this polygon. This way each point that belong to a certain cell has now the unique ID.

enter image description here

Now, how can I display only the point with the maximum elevation for each different IDs? What is the expression I have to put in the field calculator of the rule renderer?

So in other word, how can I put into formula something like:

for each "ID" show max("ele_feet")
1

I solved not directly in QGIS but importing the layer in SpatiaLite and then using an SQL statement like this:

select name, max(ele) as ele, geom, pk as pk
from layer_id
group by id 

Then I imported the query layer with DB Manager of QGIS.

BTW, thanks to this answer

Hoping this could help other people.

  • Well done buddy! Wasn't sure if this was possible in the Field Calculator, infact I'm still not sure! – Joseph Dec 11 '14 at 12:04

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.