Line width and labels based on blended values of features sharing same geometry in QGIS
up vote
3
down vote
favorite
I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min"
.
My attribute table and polyline objects look as following, see image below
"BUSLINIE"
means a bus line, "Overlap"
means if the line has overlaps, i.e. it's geometry repeats.
Values of the field "GIS@BUS_5_Min"
for these three objects has to be aggregated as one value and represented as a label sum("GIS@BUS_5_Min")
.
And the width of this line (selected in yellow) will be sum("GIS@BUS_5_Min")/100 = 19.10/100 = 0.1910
How can I achieve such output?
Is it particularly an example of a flow map?
I assume it is possible with Layer Properties > Width > Data defined override > Edit...
, but I do not know how to check the same geometry and how to sum the values of certain features with CASE WHEN condition THEN result END
conditional function?
Dissolve
function does not work in my case because I do not have any key-fields.
Related topics:
- QGIS Line width transition
- Blend differing line thicknesses in QGIS?
- Changing line width by classification in QGIS
- How to sum up values of overlapping polygons in QGIS?
- Merging attribute and geometric features in QGIS?
labeling line geometry qgis-2.0 aggregation
add a comment |
up vote
3
down vote
favorite
I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min"
.
My attribute table and polyline objects look as following, see image below
"BUSLINIE"
means a bus line, "Overlap"
means if the line has overlaps, i.e. it's geometry repeats.
Values of the field "GIS@BUS_5_Min"
for these three objects has to be aggregated as one value and represented as a label sum("GIS@BUS_5_Min")
.
And the width of this line (selected in yellow) will be sum("GIS@BUS_5_Min")/100 = 19.10/100 = 0.1910
How can I achieve such output?
Is it particularly an example of a flow map?
I assume it is possible with Layer Properties > Width > Data defined override > Edit...
, but I do not know how to check the same geometry and how to sum the values of certain features with CASE WHEN condition THEN result END
conditional function?
Dissolve
function does not work in my case because I do not have any key-fields.
Related topics:
- QGIS Line width transition
- Blend differing line thicknesses in QGIS?
- Changing line width by classification in QGIS
- How to sum up values of overlapping polygons in QGIS?
- Merging attribute and geometric features in QGIS?
labeling line geometry qgis-2.0 aggregation
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min"
.
My attribute table and polyline objects look as following, see image below
"BUSLINIE"
means a bus line, "Overlap"
means if the line has overlaps, i.e. it's geometry repeats.
Values of the field "GIS@BUS_5_Min"
for these three objects has to be aggregated as one value and represented as a label sum("GIS@BUS_5_Min")
.
And the width of this line (selected in yellow) will be sum("GIS@BUS_5_Min")/100 = 19.10/100 = 0.1910
How can I achieve such output?
Is it particularly an example of a flow map?
I assume it is possible with Layer Properties > Width > Data defined override > Edit...
, but I do not know how to check the same geometry and how to sum the values of certain features with CASE WHEN condition THEN result END
conditional function?
Dissolve
function does not work in my case because I do not have any key-fields.
Related topics:
- QGIS Line width transition
- Blend differing line thicknesses in QGIS?
- Changing line width by classification in QGIS
- How to sum up values of overlapping polygons in QGIS?
- Merging attribute and geometric features in QGIS?
labeling line geometry qgis-2.0 aggregation
I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min"
.
My attribute table and polyline objects look as following, see image below
"BUSLINIE"
means a bus line, "Overlap"
means if the line has overlaps, i.e. it's geometry repeats.
Values of the field "GIS@BUS_5_Min"
for these three objects has to be aggregated as one value and represented as a label sum("GIS@BUS_5_Min")
.
And the width of this line (selected in yellow) will be sum("GIS@BUS_5_Min")/100 = 19.10/100 = 0.1910
How can I achieve such output?
Is it particularly an example of a flow map?
I assume it is possible with Layer Properties > Width > Data defined override > Edit...
, but I do not know how to check the same geometry and how to sum the values of certain features with CASE WHEN condition THEN result END
conditional function?
Dissolve
function does not work in my case because I do not have any key-fields.
Related topics:
- QGIS Line width transition
- Blend differing line thicknesses in QGIS?
- Changing line width by classification in QGIS
- How to sum up values of overlapping polygons in QGIS?
- Merging attribute and geometric features in QGIS?
labeling line geometry qgis-2.0 aggregation
labeling line geometry qgis-2.0 aggregation
edited 2 days ago
asked Nov 29 at 11:51
Taras
1,5922522
1,5922522
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45
add a comment |
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
In the Symbology
- Stroke Width
- Data defined override
, please try an expression:
sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
In the Symbology
- Stroke Width
- Data defined override
, please try an expression:
sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
add a comment |
up vote
4
down vote
accepted
In the Symbology
- Stroke Width
- Data defined override
, please try an expression:
sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
In the Symbology
- Stroke Width
- Data defined override
, please try an expression:
sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100
In the Symbology
- Stroke Width
- Data defined override
, please try an expression:
sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100
answered Nov 29 at 14:10
Kazuhito
13.9k31576
13.9k31576
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
add a comment |
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
This is f@cking brilliant! Thank you @Kazuhito
– Taras
Nov 29 at 14:20
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
hahaha Thank you @Taras !
– Kazuhito
Nov 29 at 14:34
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@Kazuhito Does this expression work only if the geometries exactly match? For instance if one segment was longer than another that overlapped it for a short distance.
– Gabriel C.
Nov 29 at 14:52
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
@GabrielC. Yes, you are right. If there is difference in any part of the geometry, this expression fails to match them.
– Kazuhito
Nov 29 at 14:58
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%2f304379%2fline-width-and-labels-based-on-blended-values-of-features-sharing-same-geometry%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
You could add a field and, for all overlapping segments, choose a parent segment who could become the key to aggregate with. From there you could use the information from this blog post to aggregate with expressions. Could that achieve what you need?
– Gabriel C.
Nov 29 at 13:45