How to refer to xmax of labels?

المشرف العام

Administrator
طاقم الإدارة
To create dynamic leader lines I use the QGIS „Move Label“ tool and a PostGIS view.

CREATE VIEW leader_line ASSELECTgid,ST_MakeLine(geom, ST_SetSRID(ST_MakePoint(xcord_label, ycord_label), SRID))::geometry(linestring, SRID) AS geomFROM pointWHERE xcord_label IS NOT NULL;This works fine for all labels WHERE ST_X(geom) < xcord_label but creates wrong looking leader lines for labels WHERE ST_X(geom) > xcord_label.



For getting properly placed leader lines WHERE ST_X(geom) > xcord_label I had to refer to the xmax coordinates of the labels. Does anybody know how to do this?



أكثر...
 
أعلى