Question

How to set text angle when writing annotation feature class to File Geodatabase?


I need to create an annotation feature class in a file geodatabase (FGDB) from input data holding attributes like label alignment and rotation.

For some reason, the rotation angle of the text labels is not stored in the FGDB while the other attributes are.

According to the documentation (https://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_ReadersWriters/geodatabase/Feature_Representation.htm, section "Annotation Attributes"), the attribute "geodb_text_angle" can be used to specify the angle for the label. It should be measured in degrees, so I assume values between 0 and 360 are sensible.

However, while a non-zero value is present in the attribute "geodb_text_angle" just before the writer, the "Angle" is then 0 in the FGDB.

I have a simple workspace that demonstrates the issue. It just creates one feature, sets some annotation related attributes and then writes an FGDB. The issue is persistent.

I am using FME Workbench 2020.0.2.1 (Build 20238)


4 replies

Badge +2

@scherand​  It looks like there is a conflict in the LabelPointReplacer that we need to fix. LabelPointreplacer is setting the text geometry properties, which are overriding your geodb_text_angle.

 

If you drop the LabelPointReplacer and set a couple of additional attributes in the AttributeCreator this should work for you.

  • fme_type = fme_text
  • geodb_text_string = <label attribute>

dialog

Badge +2

@scherand​  It looks like there is a conflict in the LabelPointReplacer that we need to fix. LabelPointreplacer is setting the text geometry properties, which are overriding your geodb_text_angle.

 

If you drop the LabelPointReplacer and set a couple of additional attributes in the AttributeCreator this should work for you.

  • fme_type = fme_text
  • geodb_text_string = <label attribute>

dialog

also - if you set fme_rotation instead of geodb_text_angle you'll get the result you expect.

@Mark Stoakes​ Awesome! Thank you very much for the quick and concise reply. This does indeed solve (or work around) the issue.

 

I use an AttributeManager after the LabelPointReplacer not that sets fme_rotation to the value I used to have in geodb_text_angle.

Userlevel 1
Badge +11

Hi @scherand​ You could also just set the "Text Rotation" parameter in a TextPropertySetter instead of creating annotation with the LabelPointReplacer and setting the attributes geodb_text_angle or fme_rotation.

Reply