Skip to main content

Hello everyone,

 

Is it possible to place the heights of points in the CAD format in FME, but so that the text does not overlap with the entities (lines, blocks, other texts, polygons, etc.). If the algorithm for a certain point fails to find the place where it will be displayed, in that case we can display such heights in the new layer. Any idea how to solve it?

Hmm, labeling is quite hard in FME, there is one tool which is pretty effective from what I understand. The MapTextLabeller​

https://www.safe.com/integrate/maptext/

It's not part of core FME though but an at cost plug-in.

In the link though it looks like you can test it out though for free.​


My suggestion is to create multiple labels for each point, set them hexagonally around the point (6 might be enough, you can go with more positions if you wish), use TextStroker to convert them to polygons, SpatialRelator to see which overlaps something else, filter only those that don't overlap (and maybe Sampler to select just one if multiple labels of the same point remain) and replace with text at the end.

This doesn't solve the problem but it helps a little. If you want that the texts don't overlap each other you have to work extra and create some loop in a custom transformer.


  • First place the texts. use feature writer
  • immediately read the same file(just written)
  • check for overlaps (use point on line overlayer or point on area overlayer)
  • if there is a overlap
  • change the layername
  • and write to destination

Reply