1

I need to build an expression in QGIS that involves fields like Size, Rotation or Offset.

Is there any method how I could involve these fields when I am building the expression?

enter image description here

So I have a Point layer and size of points is set to eg. 3 (Map unit) and I have this Column MERITKO in Attribute table that I need to change the size of each point so what I need is to build the expression: Size * MERITKO

How can I do that?

4
  • 2
    Two problems: 1) "multiply a size of Points and Texts" is unclear 2) Questions here in GIS SE are expected to be focused on one topic, but procedures for both ArcGIS and QGIS makes this two questions. Please edit the question
    – Vince
    Feb 27, 2016 at 23:39
  • A point has no size, so cannot be "multiplied" in order to be larger. Perhaps you want to buffer a point (and therefore create a polygon), given an attribute that determines the size of the buffer? Feb 27, 2016 at 23:56
  • 1
    Yes you can build an expression involving those fields. What is the logic behind the expression. Also can we see a screenshot of your attribute table for the layer, that would help answer your question.
    – ed.hank
    Feb 28, 2016 at 11:14
  • Is it more understandable now?
    – vztk
    Feb 28, 2016 at 13:42

2 Answers 2

3

Usually we can set the size of symbols by the field like below:

(1) In the layer property window, set Unit (your case= Map Units) and click on a small icon (so-called Data defined override) on the right of Size. Please note you do not have to set the Size (you want it 3.0 for the base case) at the moment.

enter image description here

(2) Click on Edit and then give an expression as required. In this case you need 3 * "MERITKO". Click OK to close the window.

enter image description here

1

For the offset, it's little bit different.It takes a string as input: enter image description here

Here we can use an expression:

format('%1,%2',  "DeltaX" ,  "DeltaY" )

Where DeltaX and DeltaY can be the field column in your table.

1
  • Yes offset was definitly important. Good catch, thanks!
    – Kazuhito
    Oct 10, 2018 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.