How do I edit a single label in QGIS 3.4 (Madeira)?
up vote
3
down vote
favorite
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
add a comment |
up vote
3
down vote
favorite
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
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
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
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
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
qgis labeling
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
add a comment |
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
add a comment |
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:
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:
add a comment |
up vote
2
down vote
Set the labeling type to rule-based labeling,
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.
add a comment |
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.
add a comment |
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:
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:
add a comment |
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:
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:
add a comment |
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:
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:
You can use wordwrap()
function with condition in the expression to wrap only 'Golden Valley' when defining the field to use in Label with:
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:
edited Nov 20 at 10:35
answered Nov 14 at 6:12
ahmadhanb
21.2k31951
21.2k31951
add a comment |
add a comment |
up vote
2
down vote
Set the labeling type to rule-based labeling,
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.
add a comment |
up vote
2
down vote
Set the labeling type to rule-based labeling,
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.
add a comment |
up vote
2
down vote
up vote
2
down vote
Set the labeling type to rule-based labeling,
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.
Set the labeling type to rule-based labeling,
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.
answered Nov 14 at 1:41
TeddyTedTed
42319
42319
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 14 at 8:00
Vitruvius
31019
31019
add a comment |
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%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
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
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