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
Example



"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?










share|improve this question
























  • 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

















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
Example



"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?










share|improve this question
























  • 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















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
Example



"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?










share|improve this question















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
Example



"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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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




















  • 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












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





share|improve this answer





















  • 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











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',
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
});


}
});














draft saved

draft discarded


















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

























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





share|improve this answer





















  • 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















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





share|improve this answer





















  • 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













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





share|improve this answer












In the Symbology - Stroke Width - Data defined override, please try an expression:



sum("GIS@BUS_5_Min", group_by:= geom_to_wkt($geometry))/100






share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

QoS: MAC-Priority for clients behind a repeater

Ивакино (Тотемский район)

Can't locate Autom4te/ChannelDefs.pm in @INC (when it definitely is there)