In QGIS, when importing a vector file from MapInfo its styling/symbology is lost. This is quite a problem that the plugin openWOR was trying to address by importing the MapInfo workspace (.wor). But since the disapearance of that plugin from the official QGIS repo another way of styling is required(1).
The following describes a 9-step method to do just that. The method does not cater for patterns yet, only solid colours. Patterns could be added in a different number of ways that could be the subject of another post.
Import MapInfo TAB into QGIS (e.g. drap&drop the .TAB file from Explorer to the "layers Panel").
Open the 'Properties' dialog and create 3 new fields (how to...) : colour_R, coulour_G, colour_B and save.
Georeference the raster image representing the layer correctly styled.
Do not save transparency colour: uncheck "Use 0 for transparency when needed" in the 'Transformation settings' dialog of the Georeferencer.
Thus, vector and raster files should "perfectly" overlay on each other.
Put the raster below the vector in the layers stack.
Save the result as a shapefile.
Check that all points are correctly located inside their respective polygon (example).
Hide all layers in the 'Layers Panel', then only show the raster and the newly created point vector layers and select the latter.
how to...) (this is a plugin to be downloaded):Run 'Point sampling tool' (
Click the + button.
Select the last created point layer in the "Join layer" dropdown.
In the "Join field" select the field you've selected in step 4 above.
Select the same field in the "Target field".
Leave option boxes as their default values and run.
how to...) and check that the join has created 3 new fields named 'layername_R', 'layername_G' and 'layername_B', where layername is the name of the layer.Open 'Open Attribute Table' (
Enter edit mode (click the pen icon )
Now, using the "Open field calculator" run the three queries below:
Save and get out of edit mode
how to...)A) Open the 'Properties' dialog, go to the "Joins" tab and delete the join (
Go to the "Style" tab and select: 'Single symbol' from the top drop-down list.
Double-click the coloured squared to open its properties.
Click on "Simple Fill"
Click the "Data defined override" button at the right of the "Fill" field
Click "Edit..." under Expression
and in the Expression field type:
and click 'Ok' twice.
Styled vector layer (end result):
click image to enlarge
Original MapInfo data (raster):
click image to enlarge
(1) openWOR is available in the following repository:
After writing this post, I've tried openWOR on the MapInfo workspace that prompted the development of this method. Well, the results of openWOR were quite unsatisfactory. My polygon layer ended up with no colour at all, not even patterns. It could be a version problem, that I had no time to investigate.