Bug report #9579

wrong behavior of svg symbol with data defined properties

Added by matteo ghetta about 10 years ago. Updated almost 10 years ago.

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

shift_svg_symbol_anchor_bottom.pdf (299 KB) matteo ghetta, 2014-02-17 04:40 AM

8887_anchor_dataprop_bottom.png - Image of the anchor data-property option test but don't working. (22.1 KB) aperi2007 -, 2014-05-16 10:50 PM

Associated revisions

Revision 1ed94d01
Added by Radim Blazek almost 10 years ago

fixed simple marker, ellipse, svg anchor with data defined size, fixes #9579

Revision f4705703
Added by Radim Blazek almost 10 years ago

marker data defined anchor fix, fixes #9579

History

#1 Updated by Radim Blazek about 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 almost 10 years ago

  • Status changed from Open to Closed

#3 Updated by Radim Blazek almost 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 - almost 10 years ago

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 almost 10 years ago

  • Status changed from Reopened to Closed

#6 Updated by Radim Blazek almost 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 almost 10 years ago

  • Assignee set to Radim Blazek

Ticket fixed with funding from Regione Toscana-SITA (CIG:ZB10C90E5A).

Also available in: Atom PDF