Changing field types so graduated symbols are available
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 |
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 '18 at 13:50
add a comment |
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 '18 at 14:25
Gabriel C.
953320
953320
asked Dec 3 '18 at 13:37
Martin LemmaMartin 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 '18 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 '18 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 '18 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 '18 at 13:50
add a comment |
3 Answers
3
active
oldest
votes
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
add a comment |
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 '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
add a comment |
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 '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
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
add a comment |
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
add a comment |
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 '18 at 13:46
ErikErik
2,975319
2,975319
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
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 '18 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 '18 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 '18 at 13:50
add a comment |
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 '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
add a comment |
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 '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
add a comment |
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 '18 at 14:27
answered Dec 3 '18 at 14:01
JGHJGH
12k21135
12k21135
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
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 '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
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
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
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
@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
That's sensible. +1.
– Gabriel C.
Dec 3 '18 at 14:21
add a comment |
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 '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
add a comment |
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 '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
add a comment |
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 '18 at 13:47
Gabriel C.Gabriel C.
953320
953320
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
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 '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
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
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
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
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.
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 '18 at 13:50