Aligning road names in a row in QGIS












10















I am trying to align road names in a row, or column as much as possible in QGIS. I know it can be done in Adobe Illustrator with a mapping plugin, but I don't have the $$ for that.



I tried something like this but it didn't didn't seem to help.



This is an example: enter image description here



It doesn't need to be exactly like that, but I'd like to do something similar.










share|improve this question





























    10















    I am trying to align road names in a row, or column as much as possible in QGIS. I know it can be done in Adobe Illustrator with a mapping plugin, but I don't have the $$ for that.



    I tried something like this but it didn't didn't seem to help.



    This is an example: enter image description here



    It doesn't need to be exactly like that, but I'd like to do something similar.










    share|improve this question



























      10












      10








      10


      7






      I am trying to align road names in a row, or column as much as possible in QGIS. I know it can be done in Adobe Illustrator with a mapping plugin, but I don't have the $$ for that.



      I tried something like this but it didn't didn't seem to help.



      This is an example: enter image description here



      It doesn't need to be exactly like that, but I'd like to do something similar.










      share|improve this question
















      I am trying to align road names in a row, or column as much as possible in QGIS. I know it can be done in Adobe Illustrator with a mapping plugin, but I don't have the $$ for that.



      I tried something like this but it didn't didn't seem to help.



      This is an example: enter image description here



      It doesn't need to be exactly like that, but I'd like to do something similar.







      qgis labeling






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 23 at 15:21









      Vince

      14.5k32748




      14.5k32748










      asked Jan 23 at 14:54









      Troy BuergeTroy Buerge

      748




      748






















          1 Answer
          1






          active

          oldest

          votes


















          21














          (1) Draw a line as the guide for the label position.



          In this example this guideline layer has an id field "fid" with only one value (1).





          (2) Go to the Layer properties | Labels | Placement.



          There you will find Data defined | Coordinate X and Y. Select Edit from each pull-down menu.



          enter image description here



          (3) Give an expression:



          x: x(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          y: y(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          enter image description here



          (4) As the final step, please hide the guideline. Select the guideline layer and change the symbology to No Symbols.



          enter image description here






          share|improve this answer
























          • I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

            – Gabriel C.
            Jan 23 at 16:52











          • @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

            – Kazuhito
            Jan 23 at 17:20











          • Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

            – Troy Buerge
            Jan 23 at 23:03











          • I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

            – Troy Buerge
            Jan 23 at 23:21











          • Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

            – Kazuhito
            Jan 24 at 4:12











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


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309643%2faligning-road-names-in-a-row-in-qgis%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









          21














          (1) Draw a line as the guide for the label position.



          In this example this guideline layer has an id field "fid" with only one value (1).





          (2) Go to the Layer properties | Labels | Placement.



          There you will find Data defined | Coordinate X and Y. Select Edit from each pull-down menu.



          enter image description here



          (3) Give an expression:



          x: x(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          y: y(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          enter image description here



          (4) As the final step, please hide the guideline. Select the guideline layer and change the symbology to No Symbols.



          enter image description here






          share|improve this answer
























          • I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

            – Gabriel C.
            Jan 23 at 16:52











          • @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

            – Kazuhito
            Jan 23 at 17:20











          • Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

            – Troy Buerge
            Jan 23 at 23:03











          • I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

            – Troy Buerge
            Jan 23 at 23:21











          • Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

            – Kazuhito
            Jan 24 at 4:12
















          21














          (1) Draw a line as the guide for the label position.



          In this example this guideline layer has an id field "fid" with only one value (1).





          (2) Go to the Layer properties | Labels | Placement.



          There you will find Data defined | Coordinate X and Y. Select Edit from each pull-down menu.



          enter image description here



          (3) Give an expression:



          x: x(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          y: y(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          enter image description here



          (4) As the final step, please hide the guideline. Select the guideline layer and change the symbology to No Symbols.



          enter image description here






          share|improve this answer
























          • I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

            – Gabriel C.
            Jan 23 at 16:52











          • @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

            – Kazuhito
            Jan 23 at 17:20











          • Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

            – Troy Buerge
            Jan 23 at 23:03











          • I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

            – Troy Buerge
            Jan 23 at 23:21











          • Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

            – Kazuhito
            Jan 24 at 4:12














          21












          21








          21







          (1) Draw a line as the guide for the label position.



          In this example this guideline layer has an id field "fid" with only one value (1).





          (2) Go to the Layer properties | Labels | Placement.



          There you will find Data defined | Coordinate X and Y. Select Edit from each pull-down menu.



          enter image description here



          (3) Give an expression:



          x: x(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          y: y(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          enter image description here



          (4) As the final step, please hide the guideline. Select the guideline layer and change the symbology to No Symbols.



          enter image description here






          share|improve this answer













          (1) Draw a line as the guide for the label position.



          In this example this guideline layer has an id field "fid" with only one value (1).





          (2) Go to the Layer properties | Labels | Placement.



          There you will find Data defined | Coordinate X and Y. Select Edit from each pull-down menu.



          enter image description here



          (3) Give an expression:



          x: x(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          y: y(intersection($geometry, geometry(get_feature('guideline', 'fid', '1'))))



          enter image description here



          (4) As the final step, please hide the guideline. Select the guideline layer and change the symbology to No Symbols.



          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 23 at 16:40









          KazuhitoKazuhito

          15.2k31677




          15.2k31677













          • I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

            – Gabriel C.
            Jan 23 at 16:52











          • @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

            – Kazuhito
            Jan 23 at 17:20











          • Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

            – Troy Buerge
            Jan 23 at 23:03











          • I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

            – Troy Buerge
            Jan 23 at 23:21











          • Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

            – Kazuhito
            Jan 24 at 4:12



















          • I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

            – Gabriel C.
            Jan 23 at 16:52











          • @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

            – Kazuhito
            Jan 23 at 17:20











          • Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

            – Troy Buerge
            Jan 23 at 23:03











          • I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

            – Troy Buerge
            Jan 23 at 23:21











          • Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

            – Kazuhito
            Jan 24 at 4:12

















          I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

          – Gabriel C.
          Jan 23 at 16:52





          I'm always amazed at what we can do with the different functions/expressions. Another use case to remember!

          – Gabriel C.
          Jan 23 at 16:52













          @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

          – Kazuhito
          Jan 23 at 17:20





          @GabrielC. I cannot agree with you more. I'm so grateful to QGIS Dev team for these amazing expressions!

          – Kazuhito
          Jan 23 at 17:20













          Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

          – Troy Buerge
          Jan 23 at 23:03





          Wow! Thanks a lot! 1 more question and I'll definitely mark that as my answer. How do I then add a second line for if my roads go into another county, and need different names, or to do the roads that run the other way?

          – Troy Buerge
          Jan 23 at 23:03













          I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

          – Troy Buerge
          Jan 23 at 23:21





          I know it could be done by making a duplicate of the road layer, showing only labels, and not symbology, and marking the labels for "('guideline', 'fid', '2'). but I'm sure there is a better way.

          – Troy Buerge
          Jan 23 at 23:21













          Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

          – Kazuhito
          Jan 24 at 4:12





          Thanks @TroyBuerge But I am sorry I cannot think of any better solution than you have in your comment.

          – Kazuhito
          Jan 24 at 4:12


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f309643%2faligning-road-names-in-a-row-in-qgis%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

          mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?