Hi guys! I used Labeller to put a text in a street and I got success (1 and 2) , but my customer required the text centralized (3 and 4). The Labeller starts the text in Mid Point, so, how do I centralize the text? Purple Line: Bounds Green Point: Mid
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
you could use the CenteredLabelAdder from the FME Store together with a Rotator (rotation could be calculated using the AzimuthCalculator on the source feature)
If you need more powerful capabilities, there is a for-pay transformer MapTextLabeller
deaggregate it, with setting split surfaces/solids.
boundingboxaccumulator (no group by)
from resulting bounding box u get centerline, centerpoint, orientation and insertionpoint (wich is left bottomcorner of BB).
2. with the line and orientation u can aquire inersections with streetboundary if you have them as polygons.
if you already have streetcenterlines (axis) you can just affine/move center of bounding box to intersection of axis with centerline of boundingbox.
You can also test wether the text fits into the street and recalculate if needed fontsize if needed or make it multiline.
You will end up with insertionpoints for your text. The stroked text is just for calculationpurposes. (unless you want to "flow" your text. This i do with the stroked fonts)
@Itay: It does not work for me, because I did not have the street. I create this using the street (feature) + Labeller (I tested in Smallworld GUI and set center align for the annotation).
@Gio: I need the text feature, TextStroke transforms text into line feature.
But still retain retain text, its just an attribute u can acces and turn to a textobject whenever u want, and of course insertion point and boundingboxes fo desired font. No data need to be lost in this proces.
My script was more concerned to "flow" text along lines and fit em snugly in steetpolys.
Also, graphical generation is faster then text btw.
2012 doenst have a centredlabeler (afaik). And only part of Leiden (where i live) street geometry has symetrical streets anyway.
Fitting streetname on crossection of a street is not very usefull on our maps.