I am mapping various archaeological sites as points; as this is a very rough map, some of the sites share the same coordinates. The points are categorized by the type of site (as "category 1", e.g. settlement, fortifications sanctuary, necropolis etc.). Sometimes, at a single location there are multiple points/datasets per category, like multiple types of fortifications ("category 2"). I chose Point Displacement to declutter the symbols, as seen below. In a next step I just want to show only one symbol per category 1.

In the example below there are three types of fortifications (the tower symbol), like actual towers, walls, fortresses etc. But I just want it to display a single tower-symbol to show that there are fortifications in general (not showing all of them).

Is there any way to do this?

enter image description here

enter image description here

2 Answers 2


Another approach from the Field calculator is:

enter image description here

(1) Create a new column to single out the representative with an expression:

@row_number = minimum(@row_number, 
                      group_by:=concat(geom_to_wkt($geometry) + to_string("type")))

enter image description here

In this expression I used only one category "type". Please add your secondary category (e.g. +to_string("type") +to_string("type2")...) as necessary.

(2) Filter the data

enter image description here

  • I thought about something similar (as this is much more down to my skill level^^), but this approach would be a one-time fixed thing, right? I was hoping to keep it all modular in a way that I could make changes to the underlying datasheet (its a CSV from Excel) without having to do any new calculations in GIS itself everytime. May 14, 2018 at 8:30
  • @StefanBiernath Yes, you are right. Unless Create virtual field is chosen, the output field is pretty much fixed.
    – Kazuhito
    May 14, 2018 at 9:13
  • So a virtual field does adapt to changes to the file? Cool! I tried using your suggested expression "@row_number = minimum(@row_number, group_by:=concat(geom_to_wkt($geometry) + to_string("cat1")))" but didn't get any results... May 14, 2018 at 9:29
  • @Kazuhito : would u be kind enough to indicate some references about the use of $geometry in the group_by section ? i saw u made some answers of this kind on gis.stack.exchange but information are very scarce and i didn't anything clear in QGIS help ... even the right syntax to use seems mysterious to me ...
    – Snaileater
    May 14, 2018 at 10:51
  • Hi @snaileater I am probably not the qualified person... I think the useful situation of group_by is to single out some particular record (or row) to narrow down multiple records. It's the same idea you have presented as to Distinct. It's merit is that we can stick with the Field calculator (without learning Virtual layer, Spatialite, or Postgres... ).
    – Kazuhito
    May 14, 2018 at 16:14

What is the structure of your data ? You'are able to create a query that first filter your data and let only one type of object per site.

Something like the following :

Select distinct type_of_point, site_geom group by site_geom

And then u map the result of that query.

  • I have added a screenshot of my data structure. I am not very well versed in SQL, but I tried to adapt your suggestion into the query of a virtual layer. I got the error "no such column: cat1". I don't know why it doesn't recognize it. May 14, 2018 at 8:28
  • Can u post your query ?
    – Snaileater
    May 14, 2018 at 8:43

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.