3

I can't seem to make graduated symbols work. When I try to click on my column it doesn't show any options. I think these is due to those columns being formatted as text and not number. Any ideas how can i work this out?

enter image description here

enter image description here

  • Welcome to GIS SE! As a new user, please be sure to take the tour to learn about this site's focused Q&A format. – Andy Dec 3 '18 at 13:50
4

Use the field calculator to create a new integer/real column with the following code

to_int/real(dens_bru)

Then graduated symbols should be available.

  • 1
    +1 but I would use 2 lines for the code snippet to show more clearly that those are options and not a mathematical operation ;) – LaughU Dec 3 '18 at 13:50
4

Instead of selecting the column to be used for graduating, click the Expression button beside it. In there, you can transform your field from text to integer using to_int("FieldName")

In comparisons to the other answers, this one doesn't require a new layer nor to add a new column.

enter image description here

  • That's a good idea although if the column contains numeric data, why not change it to the correct type? It might solve other issues in the future. – Gabriel C. Dec 3 '18 at 14:14
  • 1
    @GabrielC. Fixing the data is the way to go if there is no other system/user depending on the current setting and the data is never refreshed from an external source. – JGH Dec 3 '18 at 14:19
  • That's sensible. +1. – Gabriel C. Dec 3 '18 at 14:21
3

You can use the Refactor fields tool to restructure your table. It will create a new layer so you can try it without fear of corrupting your existing data.

enter image description here

  • Thanks! I have tried this option before. However, when I try to save the temporary refactored file layer somehow it creates a file with all string type layers. Which is the correct format to save it? Also, fields with data with decimals (eg. "5,54") are transformed into "0". – Martin Lemma Dec 3 '18 at 15:20
  • Verify that your decimal separator is correctly set, i.e. "." versus ",". That's one main reason why a decimal field would be imported as a string field or its values mangled. – Gabriel C. Dec 3 '18 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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