Bug report #9579
wrong behavior of svg symbol with data defined properties
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Radim Blazek | ||
Category: | Symbology | ||
Affected QGIS version: | 2.0.1 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 18162 |
Description
Hi all,
svg symbol (style tab for point shapefile) seems not to take care of the data defined properties (size, offset). For example, if size is set manually, no problem, if size is set from the attribute table through the data defined properties option, the behavior is not correct.
See pdf attach for detailed information
Associated revisions
fixed simple marker, ellipse, svg anchor with data defined size, fixes #9579
marker data defined anchor fix, fixes #9579
History
#1 Updated by Radim Blazek over 10 years ago
shift_svg_symbol_anchor_bottom.pdf:
you can see a different size of symbol (ok the “area issue”, but why a different behaviour if you set the same dimension value in style window or in data properties?)
The reason for area mode is that if an attribute value is used for symbol size, it is usually used to visualize some quantitative phenomenon and human perception considers as magnitude of a symbol its area not its diameter.
The area mode makes only sense for data defined dimension, where size of each symbol is different. If a constant dimension value (defined in standard style widget, not data defined) is used, area mode makes no sense and so it is only applied to data defined dimension.
The default area mode may be changed to diameter mode in Style tab -> Advanced -> Size scale field -> Scale area / Scale diameter.
and a “shift” of the symbol from his insertion point, like
scaling origin wasn’t symbol bottom.
This is a bug.
#2 Updated by Radim Blazek over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 1ed94d01f7c3b692e753d95b08bcc205b7169cc9.
#3 Updated by Radim Blazek over 10 years ago
The same or similar problem was also with simple marker and ellipse. Symbol layers were simply ignoring data defined size in offset calculation.
It should be fixed for all.
#4 Updated by aperi2007 - over 10 years ago
- File 8887_anchor_dataprop_bottom.png added
- Status changed from Closed to Reopened
Some test that we do yesterday show that the "Point Of Vertical Anchor" don't work roperly in the data-definition.
I attachan image that show what is the don't workng's option.
Sorry the image is in Italian.
#5 Updated by Radim Blazek over 10 years ago
- Status changed from Reopened to Closed
Fixed in changeset f4705703f60e5c1ac37bf49c49f0bcdae24a73e9.
#6 Updated by Radim Blazek over 10 years ago
There were two problems with data defined anchor with SVG and ellipse symbol layers:
- data defined values were ignored (expression not retrieved before rendering)
- the keywords in help were localized while expression evaluation was not
I have disabled the translation because I am convinced that such a keywords should not be localized to keep data and projects portability. OTOH, some polygon fill parameters do support translation, so I am going to raise this question on mailing list.
#7 Updated by Radim Blazek over 10 years ago
- Assignee set to Radim Blazek
Ticket fixed with funding from Regione Toscana-SITA (CIG:ZB10C90E5A).