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
New contributor
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
New contributor
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
yesterday
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago
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
New contributor
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
New contributor
New contributor
New contributor
asked 2 days ago
N. Betland
183
183
New contributor
New contributor
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
yesterday
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago
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
yesterday
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago
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
yesterday
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
yesterday
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago
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 yesterday
answered yesterday
ahmadhanb
20.6k31847
20.6k31847
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 2 days ago
TeddyTedTed
1366
1366
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 yesterday
Vitruvius
1859
1859
add a comment |
add a comment |
N. Betland is a new contributor. Be nice, and check out our Code of Conduct.
N. Betland is a new contributor. Be nice, and check out our Code of Conduct.
N. Betland is a new contributor. Be nice, and check out our Code of Conduct.
N. Betland is a new contributor. Be nice, and check out our Code of Conduct.
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
yesterday
If your question was answered by one of the suggested answers, please select the answer that solved your problem so that it can help others. Now, as a rule of this site, if you have a new problem, please ask it in a separate question.
– ahmadhanb
16 hours ago