There is a polygon geometry in my QGIS project which represents the extents of my map. Does anybody know how to use the data defined override to get the X/Y min and X/Y max coordinates of the polygon in the print composer?
Unfortunately this isn't working:
xmin(attribute(getFeature('layername', 'gid', 1), 'geom'))
Answer
The geometry can be accessed directly rather than through the attributes:
x_min(geometry(getFeature('airports', 'cat', 1)))
No comments:
Post a Comment