Project: QGIS

Version: 3.24

Feature: Expose secondary PostGIS geometry columns as referenced geometries

As discussed in this issue, we have added support for exposing additional geometry columns from the Postgres provider as QgsReferencedGeometry. This allows more efficient interaction with additional geometry columns through the API. For example, in label placement, the additional geometry column can be used instead of the feature geometry. The fields will be represented as WKT [CRS User-Friendly Identifier] in the attribute table.

This can be used in expressions and in the label placement properties tab where you can link the label placement to the second geometry column using the Point property. In the case where you using it for labelling, the second geometry column will be updated automatically if you use the move tool and the columnt type is Geometry. If the column type is text, you could also use that as a second geometry by doing e.g.

geom_from_wkt("my wkt string field")

In this case however, the column will be read only.

So e.g. now in expressions if you have secondary geometry column you can do

buffer("my_second_geom_column", 10) and it will work.

Warning: This changes the behavior of existing projects.

This feature was funded by OPENGIS.ch

This feature was developed by Matthias Kuhn, OPENGIS.ch