18. Labelling

18.1. Introduction

A label is the text which describes one or more attributes. The labels are located over or close to the elements of one layer, according to the labelling characteristics defined by the user, as well to the changes of the View. The labels can not be modified by the user directly.

Labelling can be defined, activate or deactivate from the “Labelling” tab in the “Properties” window of the layer.

To activate/deactivate the labelling, we have to enable/disable the “Enable labelling” space.

Once the labelling had been defined, even when is disabled, the memory will keep the characteristics, so the user will not need to define them, each time the user wants to show the labels.

There are two different main types of labelling in gvSIG:

  • Label attributes defined by table. It´s a basic labelling and quick to set up.

  • User defined label. It is subdivided into different types of labelling, with multiple options for defining the different characteristics of labeling to apply.

18.2. Basic labelling. Label attributes defined by table.

The labelling can be defined quickly and based on the data of the attibute table.

The interface contains:

  1. Dropdown with the two labelling types. Select “Label attributes defined by table”

  2. Labelling parameters:

  • Field to use in label. Dropdown that allows to choose the field in the attribute table of the layer which contains the values to be displayed as labels.

  • Text height field. Dropdown to select one field of the table that contains the height of each label.

  • Fixed height. To enter a fixed value for the label size.

  • Rotation field. Dropdown to select one field and its values will indicate the rotation angle for the labels. The field must be “integer”.The angles values must be within the interval[0-360] and will be applied clockwise.

  • Units. Dropdown to select the units for measuring the values of the text height. If “Pixels” are selected, the labels will not be scaled if the View zoom changes, having the same size always.

  • Reference system. To select the units will be referred to the worl or to the paper.

  1. Font properties:

  • Font. To select the font type.

  • Single colour. To choose a colour for the labels. It´s possible to apply for transparency.

  • Colour field. Dropdown that allow to choose one of the attribute fields, so their values are taken as the colour of the labels. gvSIG uses decimal codes corresponding to 24 bits to represent colours from a table field.

When this is enabled, many labels as possible will be created, without overlapping, within the space available in the View.

18.3. Advanced labelling. Label features in the same way.

It applies the defined labelling to all the features of the layer.

The interface contains:

  1. Select from the dropdown the option “User defined labels”.

  2. Select from the dropdown “Label features in the same way”. It will show the different options for this labelling.

  1. Properties. New window to set up the characteristics of the labelling.

  2. Options. New dialogue screen to set up the characteristics of the visualization and placement of the labelling.

  3. Preview. “Enable layer preview” shows a preview of the final result for the labelling.

For more information see “Advanced labelling. Common options”


18.4. Advanced labels. Label only when feature is selected.

It applies the defined labelling only when the features are selected in he View.

This labelling is more dinamic, if the features selection changes, the labels for that new selection will be drawn automatically.

The interface is the same than the previous one.

18.5. Advanced labelling. Define classes of features and label each differently.

With this option is possile to create different labelling types with the “Add button”, give them priority of visualization (“Move up/Move down”) and label them separately.

To set up the properties, double click on the labelling row to define. “Label class properties” window will open.

For more information see “Advanced labelling. Common options”

18.6. Advanced labelling. Define classes of features and label each differently. Labelling by scale.

For more information see “Advanced labelling. Common options”.

18.7. Advanced labelling . Opciones comunes.

Properties.

To set up the labelling properties. This dialogue screen is available in all the manual labelling methods.

The interface contains:

  1. Options to set up the format and the font of the labelling.

  • Font. To select the font.

  • Color. To select the colour and transparecny.

  • Fixed text size. To define the label size.

  • Fit on text area. To give the text size depending on the area of the feature labelled.

  • Use halo. To use a colour halo around the labels. It´s useful to improve the visualization of the labels.

  • Halo width. To define the halo width.

  1. To define the labelling expression. Clicking on “...” a new window will open to set up the labelling expression.

  2. To create SQL sequencies to apply filters to the features for the different labelling types.

  3. To select a background style (image) for the labelling. “Symbol selector” window will open. In “gvSIG Basic” library there are some to be used or the user can create its labels.

    Selecting one image and clicking “Properties”, a new window will open to indicate the label ubication referred to the image.

    Clicking on “A+” the area rectangle to be used for the label or labels will be set up.

  4. Preview area of the defined label.

It is not possible to put as a background style a line layer if the option choosen is “represents the sign following the line”

Placement

To set up the properties of the labelling placement: location, orientation, duplication,...

The options of “Placement properties” will change depending on the layer geometry (points, lines or polygons). In the case of multigeometric layers (dwg, dxf, gml,...) the interface contains a tab for each type of geometry: points, lines, polygons.

For the dot layers the interface is:

  • Point settings. To choose between the label on the item or moved around.

    In the second case, the priority of the placement of the label around the dot is configurable. To do this, click on “Change location” and “Symbol selector” window will open. Click on “Properties” to show a new dialog screen where the priority of placing labels around a point can be set up.

    Using the buttons on the right and selecting positions of the chart, we will prioritize what location will take the text in relation to the point:

  • 1 = High priority

  • 2 = Medium priority

  • 3 = Low priority

  • 0 = Forbidden

  • Repeated labels. To choose between “Place one label per feature” or “Place one label per feature part “(multigeometries) or “Remove duplicate labels” which will place a label by entity and if this is repeated, it will only show one.

The interface for a line layer is:

  • Orientation. To choose from horizontal, parallel, following the line or perpendicular to this..

  • Position. To show label above, below or on the line.

  • Location. Dropdown for selecting the location at the beginning, middle or the end of the line (depending on the scanning direction)..

  • Repeated labels. To choose between “Place one label per feature” or “Place one label per feature part” (multigeometries) or “Remove duplicate labels” which will place a label by entity and if this is repeated, it will only show one.

For polygon layer the interface is:

  • Polygon settings. It allows horizontal labelling and under the orientation of the polygon, also the option to put the text inside or not. This last option is indicated for polygons with islands or U shaped polygons, in which the label will be placed within the geometry and not in the middle gap.

  • Repeated labels. To choose between “Place one label per feature” or “Place one label per feature part” (multigeometries) or “Remove duplicate labels” which will place a label by entity and if this is repeated, it will only show one.

Visualization

To set up the display scale range of the labels.

It is possible to use the same scale range specified for the labels (“General” tab in layer properties or specify a range only to be applied for the labels).

Label overlapping

If this is enabled, all the labels will be drawn, even if they overlap. If this is not checked, the labels will be drawn without ovelap, and can not showw all existing ones.

This Page