A Fast Way to Color Polygon With 200 Row With Six Selected Color in QGIS 3.4.2
I have a layer of the world that contains 200 rows.
I am required to color the map with six selected colors, the rainbow colors.
I figure that I can save selected countries and save them separately.
Once they saved I can upload them and make the color ramp I needed.
However, I was wondered is there a faster way to do this without making six layers and without choosing each country manually in the Layer Styling bar panel.
qgis layers
add a comment |
I have a layer of the world that contains 200 rows.
I am required to color the map with six selected colors, the rainbow colors.
I figure that I can save selected countries and save them separately.
Once they saved I can upload them and make the color ramp I needed.
However, I was wondered is there a faster way to do this without making six layers and without choosing each country manually in the Layer Styling bar panel.
qgis layers
add a comment |
I have a layer of the world that contains 200 rows.
I am required to color the map with six selected colors, the rainbow colors.
I figure that I can save selected countries and save them separately.
Once they saved I can upload them and make the color ramp I needed.
However, I was wondered is there a faster way to do this without making six layers and without choosing each country manually in the Layer Styling bar panel.
qgis layers
I have a layer of the world that contains 200 rows.
I am required to color the map with six selected colors, the rainbow colors.
I figure that I can save selected countries and save them separately.
Once they saved I can upload them and make the color ramp I needed.
However, I was wondered is there a faster way to do this without making six layers and without choosing each country manually in the Layer Styling bar panel.
qgis layers
qgis layers
asked Dec 9 at 7:01
Nitzan Matan
1,6041127
1,6041127
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Following further clarification by Nitzan Matan, this is another map representation.
This categorization was made by round((y(centroid($geometry))+80)/30)
.
To divide latitude range (-90 ~ +80
) in this sample data from Natural Earth into 6 zones (bands), I first added 80 and divided by 30. You will need to modify these numbers according to your dataset.
Now change the color to fit with your rainbow palette.
NB One caveat - you will notice Alaska is green. If you want it to be like Russia and Canada, consider breaking US into parts.
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part ofExtent
in theLayer Properties | Information
. But I need to know only they-coord
ofcentroid
so it does not have to be such precise.
– Kazuhito
Dec 9 at 9:48
add a comment |
As you are using QGIS 3.4.2, you can use Topological coloring Tool, which is in the Processing Toolbox | Cartography
.
Start this tool and give 6 (any number of colors you want to have) in the Minimum number of colors
and hit Run. It will return a new layer Colored with an additional integer field color_id
.
So the last step is to open the Layer Property of this layer and set Categorized
color scheme on the color_id
column (field). You then change each of these 6 random colors to your rainbow palette.
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
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%2f305455%2fa-fast-way-to-color-polygon-with-200-row-with-six-selected-color-in-qgis-3-4-2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Following further clarification by Nitzan Matan, this is another map representation.
This categorization was made by round((y(centroid($geometry))+80)/30)
.
To divide latitude range (-90 ~ +80
) in this sample data from Natural Earth into 6 zones (bands), I first added 80 and divided by 30. You will need to modify these numbers according to your dataset.
Now change the color to fit with your rainbow palette.
NB One caveat - you will notice Alaska is green. If you want it to be like Russia and Canada, consider breaking US into parts.
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part ofExtent
in theLayer Properties | Information
. But I need to know only they-coord
ofcentroid
so it does not have to be such precise.
– Kazuhito
Dec 9 at 9:48
add a comment |
Following further clarification by Nitzan Matan, this is another map representation.
This categorization was made by round((y(centroid($geometry))+80)/30)
.
To divide latitude range (-90 ~ +80
) in this sample data from Natural Earth into 6 zones (bands), I first added 80 and divided by 30. You will need to modify these numbers according to your dataset.
Now change the color to fit with your rainbow palette.
NB One caveat - you will notice Alaska is green. If you want it to be like Russia and Canada, consider breaking US into parts.
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part ofExtent
in theLayer Properties | Information
. But I need to know only they-coord
ofcentroid
so it does not have to be such precise.
– Kazuhito
Dec 9 at 9:48
add a comment |
Following further clarification by Nitzan Matan, this is another map representation.
This categorization was made by round((y(centroid($geometry))+80)/30)
.
To divide latitude range (-90 ~ +80
) in this sample data from Natural Earth into 6 zones (bands), I first added 80 and divided by 30. You will need to modify these numbers according to your dataset.
Now change the color to fit with your rainbow palette.
NB One caveat - you will notice Alaska is green. If you want it to be like Russia and Canada, consider breaking US into parts.
Following further clarification by Nitzan Matan, this is another map representation.
This categorization was made by round((y(centroid($geometry))+80)/30)
.
To divide latitude range (-90 ~ +80
) in this sample data from Natural Earth into 6 zones (bands), I first added 80 and divided by 30. You will need to modify these numbers according to your dataset.
Now change the color to fit with your rainbow palette.
NB One caveat - you will notice Alaska is green. If you want it to be like Russia and Canada, consider breaking US into parts.
answered Dec 9 at 9:28
Kazuhito
14.3k31576
14.3k31576
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part ofExtent
in theLayer Properties | Information
. But I need to know only they-coord
ofcentroid
so it does not have to be such precise.
– Kazuhito
Dec 9 at 9:48
add a comment |
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part ofExtent
in theLayer Properties | Information
. But I need to know only they-coord
ofcentroid
so it does not have to be such precise.
– Kazuhito
Dec 9 at 9:48
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
Dec 9 at 9:36
2
2
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part of
Extent
in the Layer Properties | Information
. But I need to know only the y-coord
of centroid
so it does not have to be such precise.– Kazuhito
Dec 9 at 9:48
@NitzanMatan Yes, more specifically the latitude ranges (-90.00000 ~ 83.64513) and found as part of
Extent
in the Layer Properties | Information
. But I need to know only the y-coord
of centroid
so it does not have to be such precise.– Kazuhito
Dec 9 at 9:48
add a comment |
As you are using QGIS 3.4.2, you can use Topological coloring Tool, which is in the Processing Toolbox | Cartography
.
Start this tool and give 6 (any number of colors you want to have) in the Minimum number of colors
and hit Run. It will return a new layer Colored with an additional integer field color_id
.
So the last step is to open the Layer Property of this layer and set Categorized
color scheme on the color_id
column (field). You then change each of these 6 random colors to your rainbow palette.
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
add a comment |
As you are using QGIS 3.4.2, you can use Topological coloring Tool, which is in the Processing Toolbox | Cartography
.
Start this tool and give 6 (any number of colors you want to have) in the Minimum number of colors
and hit Run. It will return a new layer Colored with an additional integer field color_id
.
So the last step is to open the Layer Property of this layer and set Categorized
color scheme on the color_id
column (field). You then change each of these 6 random colors to your rainbow palette.
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
add a comment |
As you are using QGIS 3.4.2, you can use Topological coloring Tool, which is in the Processing Toolbox | Cartography
.
Start this tool and give 6 (any number of colors you want to have) in the Minimum number of colors
and hit Run. It will return a new layer Colored with an additional integer field color_id
.
So the last step is to open the Layer Property of this layer and set Categorized
color scheme on the color_id
column (field). You then change each of these 6 random colors to your rainbow palette.
As you are using QGIS 3.4.2, you can use Topological coloring Tool, which is in the Processing Toolbox | Cartography
.
Start this tool and give 6 (any number of colors you want to have) in the Minimum number of colors
and hit Run. It will return a new layer Colored with an additional integer field color_id
.
So the last step is to open the Layer Property of this layer and set Categorized
color scheme on the color_id
column (field). You then change each of these 6 random colors to your rainbow palette.
answered Dec 9 at 8:20
Kazuhito
14.3k31576
14.3k31576
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
add a comment |
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
Dec 9 at 8:41
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
Dec 9 at 8:58
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
Sure, in your answer you made 6 colored id, They are scattered randomly. In group 1 there are row both in Africa and the U.S. I need that Russia and Canada will be one color, U.S and Europe and so on. Thanks!
– Nitzan Matan
Dec 9 at 9:10
1
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
Dec 9 at 9:15
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
Great, thanks a lot
– Nitzan Matan
Dec 9 at 9:17
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%2f305455%2fa-fast-way-to-color-polygon-with-200-row-with-six-selected-color-in-qgis-3-4-2%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