How do I edit a single label in QGIS 3.4 (Madeira)?











up vote
3
down vote

favorite
1












I'm making a map of North Dakota and trying to label the counties, but one of the names (Golden Valley) is extremely long in a very tall county. I don't want to turn the label vertically, but would rather put 'Golden Valley' on two lines so it will fit.



Is it possible to edit only that label so that it is on two lines? And how?










share|improve this question






















  • Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
    – N. Betland
    Nov 15 at 0:43















up vote
3
down vote

favorite
1












I'm making a map of North Dakota and trying to label the counties, but one of the names (Golden Valley) is extremely long in a very tall county. I don't want to turn the label vertically, but would rather put 'Golden Valley' on two lines so it will fit.



Is it possible to edit only that label so that it is on two lines? And how?










share|improve this question






















  • Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
    – N. Betland
    Nov 15 at 0:43













up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





I'm making a map of North Dakota and trying to label the counties, but one of the names (Golden Valley) is extremely long in a very tall county. I don't want to turn the label vertically, but would rather put 'Golden Valley' on two lines so it will fit.



Is it possible to edit only that label so that it is on two lines? And how?










share|improve this question













I'm making a map of North Dakota and trying to label the counties, but one of the names (Golden Valley) is extremely long in a very tall county. I don't want to turn the label vertically, but would rather put 'Golden Valley' on two lines so it will fit.



Is it possible to edit only that label so that it is on two lines? And how?







qgis labeling






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 14 at 1:06









N. Betland

183




183












  • Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
    – N. Betland
    Nov 15 at 0:43


















  • Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
    – N. Betland
    Nov 15 at 0:43
















Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
– N. Betland
Nov 15 at 0:43




Ok, I got that to work, but now I have a new problem. I had a rule on my labels that would label information from another column in my attribute table to be on a line directly under the county name. This rule on its own works, and the word wrap rule is working on its own, but they aren't working together. It's probably an obvious answer, but is there a specific operator I would need to place between both of these rules for them to both apply?
– N. Betland
Nov 15 at 0:43










3 Answers
3






active

oldest

votes

















up vote
2
down vote



accepted










You can use wordwrap() function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:



enter image description here



Here is the expression to use:



Case
When "CountyNM" = 'Golden Valley' Then wordwrap("CountyNM",6)
else "CountyNM"
End


Where "CountyNM" is the field name in this example. You need to change it based on the field name you are using.



Here is the result:



enter image description here






share|improve this answer






























    up vote
    2
    down vote













    Set the labeling type to rule-based labeling,



    enter image description here



    Then create a rule which filters out Golden Valley, label it with the expression 'GoldennValley'. "n" is a line break operator so it forces the next part of the string on to the next line.



    Then create a second rule with the filter ELSE, this will include all the other labels.



    enter image description here






    share|improve this answer




























      up vote
      2
      down vote













      Or there is the third option: In data table you can add any symbol between respective words (in my example it is a symbol ►_◄). And everywhere when there will be ►_◄ it will wrap. In this case you won't need to make any rule-based labels or to add new names in an expression.



      But remember this symbol will stay there, and you must do the same action in labels (wrap on character) in every new project using this data.



      enter image description here






      share|improve this answer





















        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%2f302552%2fhow-do-i-edit-a-single-label-in-qgis-3-4-madeira%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








        up vote
        2
        down vote



        accepted










        You can use wordwrap() function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:



        enter image description here



        Here is the expression to use:



        Case
        When "CountyNM" = 'Golden Valley' Then wordwrap("CountyNM",6)
        else "CountyNM"
        End


        Where "CountyNM" is the field name in this example. You need to change it based on the field name you are using.



        Here is the result:



        enter image description here






        share|improve this answer



























          up vote
          2
          down vote



          accepted










          You can use wordwrap() function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:



          enter image description here



          Here is the expression to use:



          Case
          When "CountyNM" = 'Golden Valley' Then wordwrap("CountyNM",6)
          else "CountyNM"
          End


          Where "CountyNM" is the field name in this example. You need to change it based on the field name you are using.



          Here is the result:



          enter image description here






          share|improve this answer

























            up vote
            2
            down vote



            accepted







            up vote
            2
            down vote



            accepted






            You can use wordwrap() function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:



            enter image description here



            Here is the expression to use:



            Case
            When "CountyNM" = 'Golden Valley' Then wordwrap("CountyNM",6)
            else "CountyNM"
            End


            Where "CountyNM" is the field name in this example. You need to change it based on the field name you are using.



            Here is the result:



            enter image description here






            share|improve this answer














            You can use wordwrap() function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:



            enter image description here



            Here is the expression to use:



            Case
            When "CountyNM" = 'Golden Valley' Then wordwrap("CountyNM",6)
            else "CountyNM"
            End


            Where "CountyNM" is the field name in this example. You need to change it based on the field name you are using.



            Here is the result:



            enter image description here







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 20 at 10:35

























            answered Nov 14 at 6:12









            ahmadhanb

            21.2k31951




            21.2k31951
























                up vote
                2
                down vote













                Set the labeling type to rule-based labeling,



                enter image description here



                Then create a rule which filters out Golden Valley, label it with the expression 'GoldennValley'. "n" is a line break operator so it forces the next part of the string on to the next line.



                Then create a second rule with the filter ELSE, this will include all the other labels.



                enter image description here






                share|improve this answer

























                  up vote
                  2
                  down vote













                  Set the labeling type to rule-based labeling,



                  enter image description here



                  Then create a rule which filters out Golden Valley, label it with the expression 'GoldennValley'. "n" is a line break operator so it forces the next part of the string on to the next line.



                  Then create a second rule with the filter ELSE, this will include all the other labels.



                  enter image description here






                  share|improve this answer























                    up vote
                    2
                    down vote










                    up vote
                    2
                    down vote









                    Set the labeling type to rule-based labeling,



                    enter image description here



                    Then create a rule which filters out Golden Valley, label it with the expression 'GoldennValley'. "n" is a line break operator so it forces the next part of the string on to the next line.



                    Then create a second rule with the filter ELSE, this will include all the other labels.



                    enter image description here






                    share|improve this answer












                    Set the labeling type to rule-based labeling,



                    enter image description here



                    Then create a rule which filters out Golden Valley, label it with the expression 'GoldennValley'. "n" is a line break operator so it forces the next part of the string on to the next line.



                    Then create a second rule with the filter ELSE, this will include all the other labels.



                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 14 at 1:41









                    TeddyTedTed

                    42319




                    42319






















                        up vote
                        2
                        down vote













                        Or there is the third option: In data table you can add any symbol between respective words (in my example it is a symbol ►_◄). And everywhere when there will be ►_◄ it will wrap. In this case you won't need to make any rule-based labels or to add new names in an expression.



                        But remember this symbol will stay there, and you must do the same action in labels (wrap on character) in every new project using this data.



                        enter image description here






                        share|improve this answer

























                          up vote
                          2
                          down vote













                          Or there is the third option: In data table you can add any symbol between respective words (in my example it is a symbol ►_◄). And everywhere when there will be ►_◄ it will wrap. In this case you won't need to make any rule-based labels or to add new names in an expression.



                          But remember this symbol will stay there, and you must do the same action in labels (wrap on character) in every new project using this data.



                          enter image description here






                          share|improve this answer























                            up vote
                            2
                            down vote










                            up vote
                            2
                            down vote









                            Or there is the third option: In data table you can add any symbol between respective words (in my example it is a symbol ►_◄). And everywhere when there will be ►_◄ it will wrap. In this case you won't need to make any rule-based labels or to add new names in an expression.



                            But remember this symbol will stay there, and you must do the same action in labels (wrap on character) in every new project using this data.



                            enter image description here






                            share|improve this answer












                            Or there is the third option: In data table you can add any symbol between respective words (in my example it is a symbol ►_◄). And everywhere when there will be ►_◄ it will wrap. In this case you won't need to make any rule-based labels or to add new names in an expression.



                            But remember this symbol will stay there, and you must do the same action in labels (wrap on character) in every new project using this data.



                            enter image description here







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 14 at 8:00









                            Vitruvius

                            31019




                            31019






























                                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%2f302552%2fhow-do-i-edit-a-single-label-in-qgis-3-4-madeira%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

                                Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                                ComboBox Display Member on multiple fields

                                Is it possible to collect Nectar points via Trainline?