GispoCoding / qaava

QGIS toolbox for land use planners in Finland. Kaavoittajan työkalut QGIS-lisäosana. NOT UPDATED!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Short text for spatial features (labeling / visualisation / indexing)

SannaJokela opened this issue · comments

Need: short text/labels ("lyhenne") for features. Possible solutions:

  1. Add "lyhenne" to kaavaelementti.geom tables. (Eg. heritage site SR with index number 25: label-text "SR25" shown on maps for heritage sites).
  2. Use numerical values for labeling (numeerinen_arvo) thus only adding value "lyhenne" to the numerical value code list. Needs relation_aggreagate function and rules for visualisation for different types of numerical values. Becomes quite complex...
  3. Short label text for all spatial features (easy way). Possible problems: if text is different from the numerical values

Possible solution:

If short text is usually used as a label and comes from the numerical value -table, label can be fetched with an expression. When assembling the legend, the label might become an issue.

To fetch the label from another table via relations can be done with multiple values like this

relation_aggregate(
relation:= 'relationx',
aggregate:='concatenate_unique',
expression:=fieldname, concatenator:=', ')

Since the labels require a lot of adjusting and can vary depending on the level of planning and features, would an easy fix be "label-text"-field in all spatial objects? Then this field could be used more easily to build labeling. Since numerical values are N:M relation, it becomes very difficult to gain the needed information from the table. Label-text could indicate the index-value of the feature (like SR-1, SR-2, SR-3) and index-value could be something the user calculates and can be separate from gid-value. Label-text-field could also provide information to visualisations, like the lollipops (can be done with visualisation or labeling).

However the numerical values are still needed and moving towards digital interpretation the visual labeling might not become so important.

No longer updated