在QGIS Geometry生成器符号层类型表达式中使用某些“临时变量”?
通过使用Geometry generator符号图层类型,我在尺寸@nv_bg_w(宽度)和@nv_bg_h(高度)(项目变量)的矩形上绘制线要素,可以在坐标text_x, text_y(属性,如果不是NULL)处,也可以在线的中心处,使用以下表达式: geom_from_wkt( 'POLYGON((' || COALESCE("text_x", x(point_on_surface($geometry))) ||' '|| COALESCE("text_y", y(point_on_surface($geometry))) || ','|| (to_real(COALESCE("text_x", x(point_on_surface($geometry)))+ @nv_bg_w )) ||' '|| COALESCE("text_y", y(point_on_surface($geometry))) || ','|| (to_real(COALESCE("text_x", x(point_on_surface($geometry)))+ @nv_bg_w )) ||' '|| (to_real(COALESCE("text_y", y(point_on_surface($geometry))))- @nv_bg_h ) || ','|| COALESCE("text_x", x(point_on_surface($geometry))) ||' '|| (to_real(COALESCE("text_y", y(point_on_surface($geometry))))- @nv_bg_h ) || ','|| COALESCE("text_x", x(point_on_surface($geometry))) ||' '|| …