I have a FME transformer that converts MapInfo TAB files to GML. What I would like is for the pen colour, pattern and width information to be brought across to the GML somehow. It really doesn't matter how it appears in the GML as the resulting file is parsed by some custom code anyway. It would probably be ideal for it to appear as an XML attribute on each feature in the file, though.

I put in an AttributeExposer with the following attributes:

  • mapinfo_pen_color
  • mapinfo_pen_pattern
  • mapingo_pen_width

and I was hoping to see these in the output, but sadly not. What am I doing wrong?

Here's what I have currently: enter image description here

The Pen_Color isn't coming through, so I added another attribute Test set to a constant to see whether the expression on the former was the issue. That does not appear in the output GML either.


1 Answer 1


You can't build style into a GML the same way as you can in a MapInfo tab, however you can still bring that information over into your GML as an attribute against the features.

You will need to add attributes to you GML feature to accept your MapInfo pen, color and width . enter image description here

Then link the exposed mapinfo_pen_* attributes to those attributes. Once that is done you could potentially use those attributes to style your features in the application that you are using to display the GML.

enter image description here

You may want to decode the integer values into more user friendly definitions before writing them to the GML.

If you want to retain the styling as part of the feature, KML may be a better option.

  • Thanks for that. So to start with I should have an AttributeExposer to expose the pen color etc., then link that into an AttributeCreator?
    – Coxy
    Commented Sep 3, 2014 at 2:33
  • Once they are exposed you can treat them the same as any attribute in FME. I'll see try an add a screenshot to the answer
    – MickyT
    Commented Sep 3, 2014 at 2:40
  • Thanks for the screenshot, but I need to do this in a transformer. Is there no way to accomplish this using the AttributeExposer/Creator building blocks?
    – Coxy
    Commented Sep 3, 2014 at 2:52
  • You need to define attributes in the writer's featuretype for the exposed/created attributes to go to otherwise they will not be written to the GML. Looking at your screenshot I would say none of your attributes are going through
    – MickyT
    Commented Sep 3, 2014 at 2:57
  • 1
    Let us continue this discussion in chat.
    – MickyT
    Commented Sep 3, 2014 at 3:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.