Bug report #12876

Proportionnal size styles from previous versions are not converted correctly

Added by Regis Haubourg about 9 years ago. Updated about 9 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Vincent Mora
Category:Symbology
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

Description

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
[[http://osgeo-org.1560.x6.nabble.com/Data-defined-symbol-size-is-not-backwards-compatible-to-2-8-2-td5208256.html#a5209109]]

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..

Régis

see previous references on lists :
[[http://osgeo-org.1560.x6.nabble.com/Re-Qgis-developer-Data-defined-buttons-for-quot-en-masse-quot-size-and-rotation-td5181985.html]]

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

Associated revisions

Revision 65a57edc
Added by Vincent Mora about 9 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 about 9 years ago

Merge pull request #2111 from vmora/issue_12876

fix #12876

History

#1 Updated by Vincent Mora about 9 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 about 9 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 about 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF