Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
As MickyT mentions gml does not support it galdosinc.com/resource/open-standards/geography-markup-language KML is supported –  Mapperz Sep 3 at 2:24

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.

share|improve this answer
    
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 Sep 3 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 Sep 3 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 Sep 3 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 Sep 3 at 2:57
1  
Let us continue this discussion in chat. –  MickyT Sep 3 at 3:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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