A Fast Way to Color Polygon With 200 Row With Six Selected Color in QGIS 3.4.2
up vote
4
down vote
favorite
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 |
up vote
4
down vote
favorite
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 |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
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 20 hours ago
Nitzan Matan
1,5671027
1,5671027
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
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
17 hours ago
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
17 hours ago
add a comment |
up vote
2
down vote
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
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
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
17 hours ago
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
17 hours ago
add a comment |
up vote
5
down vote
accepted
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
17 hours ago
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
17 hours ago
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
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 17 hours ago
Kazuhito
14.1k31576
14.1k31576
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
17 hours ago
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
17 hours ago
add a comment |
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
17 hours ago
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
17 hours ago
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
17 hours ago
Very smart!, Can you explained more about the latitude range?
– Nitzan Matan
17 hours ago
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
17 hours ago
@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
17 hours ago
add a comment |
up vote
2
down vote
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
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
add a comment |
up vote
2
down vote
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
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
add a comment |
up vote
2
down vote
up vote
2
down vote
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 19 hours ago
Kazuhito
14.1k31576
14.1k31576
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
add a comment |
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
18 hours ago
The new color id are random, I need then to be from the bottom up like the flag.
– Nitzan Matan
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
Sorry @NitzanMatan I honestly do not understand your comment. Could you expound it a little bit more?
– Kazuhito
18 hours ago
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
18 hours ago
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
18 hours ago
1
1
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Aah, color bands like the flag? Gotcha! Thanks @NitzanMatan for clarification.
– Kazuhito
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
Great, thanks a lot
– Nitzan Matan
18 hours ago
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