Bug report #17509

@geometry_point_count always equal to 1

Added by Alexey T about 7 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Symbology
Affected QGIS version:3.4.4 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25406

Description

I am using @geometry_point_count to style marker line feature.
Looks like this variable is always equal to 1.

test.jpeg (30.7 KB) Alexey T, 2017-11-21 06:29 PM

History

#1 Updated by Giovanni Manghi about 7 years ago

  • Status changed from Open to Feedback
  • Easy fix? changed from Yes to No

Is this a regression?

#2 Updated by Alexey T about 7 years ago

Giovanni Manghi wrote:

Is this a regression?

My english is not very good, I don't understand your question. Please clarify.

#3 Updated by Giovanni Manghi about 7 years ago

Alexey T wrote:

Giovanni Manghi wrote:

Is this a regression?

My english is not very good, I don't understand your question. Please clarify.

did it worked as expected in a previous qgis release?

#4 Updated by Alexey T about 7 years ago

Giovanni Manghi wrote:

Alexey T wrote:

Giovanni Manghi wrote:

Is this a regression?

My english is not very good, I don't understand your question. Please clarify.

did it worked as expected in a previous qgis release?

I haven't ever used any previous releases.
May be the attached image will provide some help.

The first line is marker line with "font marker". Data defined override is set to:
to_string( @geometry_point_num )
So every marker is printed as its number.

The second line is marker line with "font marker" and data override set to:
to_string( @geometry_point_count)
Instead of printing total count of markers, there is symbol 'A' or any other symbol chosen in font marker style. So data override doesn't work for this expression.
Output preview in expression string builder shows '1'.

#5 Updated by Giovanni Manghi almost 7 years ago

  • Status changed from Feedback to Open

#6 Updated by Jürgen Fischer almost 6 years ago

  • Status changed from Open to Feedback

Please test with QGIS 3.4 - QGIS 2.18 reached it's end of life.

#7 Updated by Alexey T almost 6 years ago

Tested in QGIS v3.4.4

First. If marker placment is set to "on wevery vertex"
@geometry_point_count shows total number of visible points
If marker placment set to "with interval"
@geometry_point_count shows just letter "A" or something else, chosen font's marker properties

Second.
This variables names are very confusing.
This variables show not the gemotry point count or number, but marker's count or number curerntly visible on canvas.

#8 Updated by Giovanni Manghi almost 6 years ago

  • Affected QGIS version changed from 2.18.14 to 3.4.4

Alexey T wrote:

Tested in QGIS v3.4.4

First. If marker placment is set to "on wevery vertex"
@geometry_point_count shows total number of visible points
If marker placment set to "with interval"
@geometry_point_count shows just letter "A" or something else, chosen font's marker properties

change the title and description accordingly, thanks.

Second.
This variables names are very confusing.
This variables show not the gemotry point count or number, but marker's count or number curerntly visible on canvas.

file a separate ticket.

#9 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Feedback to Closed

This is fixed for 3.4.5/3.6

Also available in: Atom PDF