Hot answers tagged labeling
10
Go to the Layer Properties dialog Symbology tab and click on the Symbol. On the Symbol Selector dialog click Properties.
Then uncheck the symbol on the layers list at the left.
Click ok until you close all the dialogs.
10
I generally use the character ² or U+00B2. So it is km², without requiring any special formatting.
If you have a MS Windows keyboard, type the sequence: Alt+0178
Other platforms have different ways of typing this character. You can also copy/paste the Unicode character. More info: http://www.fileformat.info/info/unicode/char/b2/index.htm
9
The answer depends on context: if you will be investigating only a small (bounded) number of segments, you might be able to afford a computationally expensive solution. However, it seems likely that you will want to incorporate this calculation within some kind of search for good label points. If so, it is of great advantage to have a solution that either ...
9
What you need is the (quite new) plugin "Easy custom labeling":
Easy custom labeling v. 0.3, Regis Haubourg (AEAG) - 2012. Action 1:This plugin duplicate a layer, transforming geometries into centroids, and adds all required fields for custom labeling. Action 2 - Arrow function draws lines between label and original object WARNING! This plugin requires ...
8
According to this post, the default display field is chosen according to the following priorities:
First field of type Text whose name contains the word "name" (case-insensitive)
First field of type Text
First field of an integer type (Long or Short, presumably)
First field of any type
I don't think there is any way to specify the primary display field ...
7
While there is no comfortable editor for label properties available yet, you can achieve the effect of label classes using "data defined labeling":
This requires some data preparation, but the results should be just what you are looking for.
Also of interest to you might be the new labeling tools by Sourcepole:
move label tool … move text labels to a ...
7
Yes! One can definitely set different font sizes for different fields within a single label.
Please see this Link: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s800000027000000.htm
Look at the font attribute. You can set a particular size for the important part of the label and a smaller size for the less important part.
7
The second idea (to create a boolean attribute for selection) has many advantages:
(i) it clearly documents what needs to be labeled,
(ii) it is as permanent and portable as the underlying dataset,
(iii) it provides a simple and direct mechanism to determine which labels will appear (which is even portable to another GIS or plotting package),
(iv) it ...
7
Yes, it's possible to manually place labels using the labeling tools in the label toolbar:
move label tool … move text labels to a new position
rotate label tool … allows for interactive rotation of labels
label property tool … opens a dialog where users can manipulate the properties and text of a label
BUT you won't be able to have curved labels ...
7
For long term support you should use the Toolbar based labelling button. This is the v2 labelling engine.
QGIS has two labelling engines due to a upgrade but the old one is yet to be removed, it's on the TODO list however there are still a few things missing from the old labelling that need to be ported over.
7
Currently, this is an unfulfilled feature request (see Feature #1385).
You could add your ideas for new 'tokens' (or 'fields' as they are monikered in the request). Remember to include recommended formatting options as per Qt classes for the data type, like has been done with the syntax of $CURRENT_DATE(yyyy-MM-dd), which is resolved using ...
7
You can use a QGIS expression in the label expression.
"Date" || '\n' || "Size" || '\n' || "name"
You can even wrap the expression over multi lines to do the same thing
"Date" || '
' || "Size" || '
' || "name"
Note the ' at the end and start of each line. The first is clearer with its intentions so I would use that.
7
Ignoring font size for the minute, you could achieve your first option by centering the label above the point, in QGIS 1.9 you have the option to center the text under the multiple lines section. If you have included a newline character in your expression you can leave the 'Wrap on character' box empty (or I put a slash in my expression instead of the '\n' ...
6
Some things to try:
Add the featureclass or shapefile to
map again, don't move it into a
group layer, don't set any scale
ranges and turn on labels. This
will tell you if there's something
wrong the data or if it's your layer
configuration.
Check to see if you are using label
classes and if you are, check the
SQL query for the label
classes(including ...
6
You can turn on dynamic labels for multiple layers at one time by opening the Label Manager and checking the box next to each layer.
Suggestion: Set Scale Ranges
Some labels are most useful within a given scale range.
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Setting_scale_ranges_for_label_classes
6
There are 2 possibilities that I can come up with:
Use the script at this ESRI Forum; OR
Copy the numbers in the count column and manually paste them over to the label column when you define & tweak your symbology categories (as shown below).
6
Two things:
In the label position tab (using mapplex) try using the fixed position setting.
Also in your annotation fc if you open the attribute table, start an edit session, then change the status to placed.
Does that help?
EDIT:
Another idea:
create xy values for centroid,
export as dbf,
then re-load as XY event, and
label the points ...
6
You can probably just set the rule in the new expression-based labeling. The rule will work as documentation of what you have been doing to get the resulting labels.
The advantage over the "boolean flag" approach is that this is more flexible while working on the correct rule. It's easy to change and improve the rule without altering the underlying data ...
6
There is not a complete set of documentation for the data defined labeling features, but here is a breakdown of their values, and how they are used by QGIS's PAL labeling engine in version 1.8:
Size [real] Defines the font size, though how the number is interpreted is dependent upon the setting for the layer (points or map units), which can not be data ...
6
An alternative to Nathan's excellent reply is to use the new labeling tab in QGIS 1.9 (also available in 1.8 but not from the layer properties menu. Instead go to Layer->Labels).
If you scroll down on the label settings tab you will find a Multiple Lines option, where you can specify the character to wrap the line on. This will be helpful if you are ...
6
You could use an Expression for the label and insert new line characters to create a stacked label.
"Map Id: " & [MapID] & vbCrLf & "Name: " & [SchoolName]
See http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s800000027000000.htm
6
In the current version of QGIS (1.8) you will have to have three different label objects under each other. You can group the label items so that you can move them around as a block.
However in the latest dev version there is a new HTML labels feature that you could use to do this.
<h1>mmmm HTML label</h1>
<b>Some bold text</b>
...
5
Ensure that the "Place overlapping labels" check mark is unchecked. This will not re-position or rotate labels but rather remove labels that overlap other labels. If you would like you can create a "static" annotation features class and export both placed and unplaced annotations. This way you can "turn-on" the overlapping labels and place them manually one ...
5
You could just save the layer file then create a UI button (or an Add-on in v.10) and use the following code to import the labels:
Dim pGxFile As IGxFile
Dim pGFLayer As IGeoFeatureLayer
Dim pGxLayer As IGxLayer
Dim pGxDialog As IGxDialog
Dim pGxObjFilter As IGxObjectFilter
Dim pEnumGxObj As IEnumGxObject
Dim pAnnoLayerPropsColl ...
5
The right syntax is like :
vectorlayer.features[1].style = {label: "Updated label"};
Here comes a full piece of code :
<script type="text/javascript">
// few sample data
var box_extents = [
[-10, 50, 5, 60],
[-75, 41, -71, 44],
[-122.6, 37.6, -122.3, 37.9],
[10, 10, 20, 20]
...
5
You can make sure that the geometry is of type polygon so that it only gets the label if it's a polygon and not the line or point. By adding && feature.geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon" to your if statement. That should work.
Like this:
...
getLabel: function (feature) {
if (mycontrolIsNotInEditMode && ...
5
Under the layer properties>labels tab you can setup multiple labeling classes (under the Method drop down) for your labeling scales. Labels can be rendered by query using the SQL Query button for each class. You can also use the Scale Range button to show or not show a certain class within certain scale ranges.
5
You can create Halo Text as as current workaround
This Guide runs through labeling in QGIS
http://mapeoamano.org/en/manuals/how-to-prepare-a-high-resolution-large-format-map-using-qgis
5
Some useful stuff here for 1.8 and older
http://hub.qgis.org/projects/quantum-gis/wiki/How_do_I_do_that_in_QGIS
http://hub.qgis.org/wiki/quantum-gis/Calculating_field_values
http://hub.qgis.org/wiki/quantum-gis/List_of_Field_Calculator_Functions
4
Have you confirmed that there are not stacked points located in the third layer? If you have 2 points that are exactly in the same location and then default label them (both), you will end up with 2 labels that are labeled in the upper left and upper right, but looks like the text is being duplicated from one label point.
In the example below, you can see ...
Only top voted, non community-wiki answers of a minimum length are eligible


