Bug report #8887
qgis don't use correctly the map-units in dimension of data-defined-properties for SVG
|Affected QGIS version:||2.0.1||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17566|
when use a SVG symbol, and choose a data-definition field for the dimension.
QGIS sclae the symbol, ma don't follow correctly the scale.
If I choose the "millimeters" unit it work correctly, but if I choose the "map unit" it grow but not proportionally to the
#1 Updated by Radim Blazek over 7 years ago
- Resolution set to invalid
There is no bug but it is quite tricky. Data defined size may be used in two modes as area or diameter. Unfortunately that mode is set on renderer level (far from data defined size definition) in renderer widget "Advanced -> Size scale field -> Scale area / Scale diameter". If the mode is area (default), square root of the value is used for symbol size. It applies also to simple marker.In 3256c92 I added to the size property label also the mode. So it looks like:
- Size (area)
- Size (diameter)
Hopefully sufficient, there is no space for longer description.
The question is if the mode should be applied on renderer level. Maybe it should be moved down to symbol layers definition. More symbols with different modes may be required. There are other cases where a value may be overwritten recursively from top level (color for example), but the UI is not ideal, it should be more obvious that the value is going to be applied to all (not always) subitems.
BTW: the mode name 'area' is not perfect, because it is using simply square root and does not consider real symbol shape. So the resulting areas (circle for example) are not really equal to the data value. This may be quite dangerous and it should be shown in UI more explicitly, but where?
The symbology UI needs to be enhanced a bit IMO.
#4 Updated by Radim Blazek over 7 years ago
aperi2007 - wrote:
But, I guess perhaps there some other code bug, because also thinking to a simple square root resize the symbol seem do not resize correctly when the scale change.
I have to apologize, there was really a bug in order when sqrt was applied for svg and simple symbol.