4

I have a layer in QGIS of which some entities share the same geometry. As a result when I click on an entity, the result identification often shows several entities.

Is there a way to display the number of overlapping entities on the map ?

1
  • I might suggest looking into the labeling symbiology. You could create a new feature and sum the amount of entries that fall within the same location and then display that sum value with the symbiology.
    – Binx
    Commented Apr 7, 2022 at 14:25

2 Answers 2

4

You can add a label that fetch and count identical geometries. Click the expression icon beside the label value box.

array_length(overlay_equals('New scratch layer',1))+1

Let's break it down:

overlay_equals('New scratch layer',1) : using the current geometry, look in the given layer for other geometries being identical. Return, in an array, the value 1 for each matching geometry.

array_length(): count how many identical geometries were found

+1: since overlay_equals ignores the current geometry, add 1 to count the source geometry.

enter image description here

3

Use the Identify Features Icon and click on a geometry - it shows you how many features there are.

Another possibility is to create a label that counts the number of identical features using this expression: array_length(overlay_equals( @layer, $id))+1

enter image description here

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.