Changing field types so graduated symbols are available
up vote
3
down vote
favorite
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?
qgis symbology fields-attributes
add a comment |
up vote
3
down vote
favorite
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?
qgis symbology fields-attributes
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 at 13:50
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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?
qgis symbology fields-attributes
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?
qgis symbology fields-attributes
qgis symbology fields-attributes
edited Dec 3 at 14:25
Gabriel C.
80518
80518
asked Dec 3 at 13:37
Martin Lemma
161
161
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 at 13:50
add a comment |
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 at 13:50
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 at 13:50
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 at 13:50
add a comment |
3 Answers
3
active
oldest
votes
up vote
3
down vote
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 at 13:50
add a comment |
up vote
3
down vote
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.
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 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 at 15:45
add a comment |
up vote
3
down vote
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.
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 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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
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 at 13:50
add a comment |
up vote
3
down vote
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 at 13:50
add a comment |
up vote
3
down vote
up vote
3
down vote
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.
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.
answered Dec 3 at 13:46
Erik
2,777118
2,777118
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 at 13:50
add a comment |
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 at 13:50
1
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 at 13:50
+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 at 13:50
add a comment |
up vote
3
down vote
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.
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 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 at 15:45
add a comment |
up vote
3
down vote
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.
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 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 at 15:45
add a comment |
up vote
3
down vote
up vote
3
down vote
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.
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.
answered Dec 3 at 13:47
Gabriel C.
80518
80518
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 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 at 15:45
add a comment |
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 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 at 15:45
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 at 15:20
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 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 at 15:45
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 at 15:45
add a comment |
up vote
3
down vote
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.
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 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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
add a comment |
up vote
3
down vote
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.
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 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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
add a comment |
up vote
3
down vote
up vote
3
down vote
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.
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.
edited Dec 3 at 14:27
answered Dec 3 at 14:01
JGH
11.6k21134
11.6k21134
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 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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
add a comment |
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 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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
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 at 14:14
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 at 14:14
1
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 at 14:19
@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 at 14:19
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
That's sensible. +1.
– Gabriel C.
Dec 3 at 14:21
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f304730%2fchanging-field-types-so-graduated-symbols-are-available%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
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 at 13:50