Bug report #12876

Proportionnal size styles from previous versions are not converted correctly

Added by Regis Haubourg over 7 years ago. Updated over 7 years ago.

Assignee:Vincent Mora
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20967


Recent refactoring of size varying UI in master converts old size varying options (advanced field or expression on symbol / sub symbols) but does obtain different results than before

See attached package with data and projects files. prop_size_28.qgs is created in 2.8. prop_size_29 is version 2.8 saved in 2.9.

-First issue with advanced field with scale area option. master converts it to symbole size * sqrt(myfield) which is exactly equivalent to what happens in 2.8. Anyway, rendered size is lot smaller on screen than on 2.8, so there may still be some multiplication factor in the code..

-When importing a style with size expressions on sub-symbols only, expressions are converted (same issue as above), and there is also an expression set on top level. That expression should be deactivated since there was no expression on top level in 2.8..


see previous references on lists :

proportionnal_size.zip (398 KB) Regis Haubourg, 2015-06-04 06:06 AM

Associated revisions

Revision 65a57edc
Added by Vincent Mora over 7 years ago

fix #12876: data-defined size was too small
The scale methos "by area" was still defined at the symbol level causing
an extra sqare root to be applied to the size.

Revision 53cb5df9
Added by Nyall Dawson over 7 years ago

Merge pull request #2111 from vmora/issue_12876

fix #12876


#1 Updated by Vincent Mora over 7 years ago

  • Pull Request or Patch supplied changed from No to Yes

Thanks for the repport,

A second square root is applied at the subsymbol level (the scale method was not converted to ScaleDiameter at this level), and that's the cause of the reduced size.

A fix is here https://github.com/qgis/QGIS/pull/2111

I compared the imported 2.8 project (with the fix) and the 2.8 with QGIS 2.8 and all layers look the same except the last one, which is expected. The last one as a scale method at the higher level that used to mess up the symbol aspect ratio (in QGIS 2.8 an before). For large scales the symbols are the same size, whereas one is twice the other for small scales.

For the second item, I'm not sure I understand it. Can you test the fix and see it it solves the second item please ?

If you want to control symbol size independently, then you can use expressions at the sub-symbol level expression.

#2 Updated by Vincent Mora over 7 years ago

I forgot to mention that I found another difference between the two versions (2.8, 2.9): features with NULL field in data-defined are drawn in 2.9. I think this is a new issue.

#3 Updated by Nyall Dawson over 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF