3

I am using FME to try and transfer hundreds of MapInfo TAB files into PostGIS.

I know how to get the tables into PostGIS using FME but I cannot work out how to transfer the styles of the MapInfo tables over.

For example, council owned land has a style of red polygons in my MapInfo TAB file, I want to keep those saved red polygons when taking the layer to PostGIS but I lose the style of the layer in the process.

Does anyone know what I am missing?

3
  • What software are you using to display the PostGIS data?
    – CL.
    Commented May 7, 2018 at 14:47
  • QGIS to display the data, once it is in PostGIS
    – Megan
    Commented May 9, 2018 at 10:20
  • You can get all the information into the table, but while QGIS allows styling with rules, I am not aware of a mechanism to read the style itself from the data. I guess you have to add QGIS rules like "Council→red". (You could also use "fme_fill_color→red" rules, but that would still require one rule per value.)
    – CL.
    Commented May 9, 2018 at 11:19

1 Answer 1

5

MapInfo is a format that can store style information. In FME you can read this data using format attributes. For the red polygons you would be looking for fme_color and fme_fill_color. Just go to the format attributes tab in the feature type and expose the ones you want.

MapInfo FME format attributes

More info in the documentation: http://docs.safe.com/fme/2018.0/html/FME_Desktop_Documentation/FME_ReadersWriters/mapinfo_extended/Feature_Representation.htm

However, your problem is that PostGIS doesn't store style information natively. You might use an external style file or other options depending on where you are displaying your data. What you can always do is transferring the style information of the MapInfo format attributes into PostGIS attributes so you can use them after for styling.

3
  • 1
    Specifically, the mapinfo_brush and mapinfo_pen attributes are relevant.
    – Fezter
    Commented May 3, 2018 at 22:46
  • Thank you. I have tried to tick these options but I am still having no luck
    – Megan
    Commented May 9, 2018 at 10:21
  • 1
    You will also need to add them on the other side of the workspace. On the right-hand object, open the parameters dialog and click User Attributes. In the list of attributes being created you will need to create two new attributes to store this information. Then use an AttributeCopier transformer to copy the FME attributes into your new user attributes Commented May 11, 2018 at 15:59

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.