Map Room Home page  
written by Nigel James
 
Contents
 
   
MAPINFO How to...  
No. 19: Using data from OS Opendata in MapInfo  
(References to file and folder locations are not applicable outside the Map Room, so if you are located elsewhere, you should substitute your own)  
   
A Range of datasets are now available from the OS Opendata website and some of these have been downloaded and converted ready for use on the MapInfo workstations in the Map Room. This guide explains how to use both these and data you download yourself.  
   
This How to guide explains how to download and convert/import data from the Ordnance Survey Opendata website and use it in MapInfo  
   
Some data is in raster format (scanned mapping) and this can be used without conversion. You need the appropriate .tab file for each raster image and these are downloaded with the raster images. Other data is in vector format (DXF, ESRI Shapefile and NTF) and needs to be imported or converted (shapefiles for example can be opened directly in MapInfo, but they are converted each time and cannot be edited, so it is better to convert them first to MapInfo format).  
   
Part One covers Raster Data
Part Two covers Vector Data
 
   

 
   
Part 1: Raster data  
   

The small-scale raster data (Miniscale and 1:250 000) is downloaded in a single download covering the entire GB. Large-scale raster (Street View and VectorMap District Raster, etc.) is downloaded by 100km grid square (SP, SU etc) and consists of 20 x 20km blocks covering the grid square (or part of the square where it includes areas of sea).

To assist with selecting grid squares, Map Room users can open a 100km grid layer to superimpose on a suitable basemap in MapInfo (such as the Miniscale map). This has the 100km grid square letters (SP, SU etc) and is in the OS Opendata folder on the Map Room server (Z:) drive. Other users can download it here:

OS 100km grid for MapInfo

A 20km grid with the block names (SP00, SP02 etc) corresponding to individual raster tiles (VectorMap District Raster etc) is also in the OS Opendata folder on the Maproom server and other users can also download it:

OS 20km grid for MapInfo

Unzip the files and open the table in MapInfo. To display the block names open the Layer Control and click the Autolabel checkbox. The block names will then be displayed.

 
   
To display the raster data the *.tab files and the images (*.tif) must be in the same folder. When you unzip the downloaded data from OS the .tab files will be in a separate georeferencing files folder, so move them into the same folder as the raster files before trying to open the raster mapping.  
   

If the raster mapping does not display, it may be because the mapper is at too large or too small a scale. If you open the Layer Control you may see a magenta tick in the Visible checkbox - this means that the Display within Zoom Range option is active:

Click the Display button to open the Raster Display Options dialog:

Uncheck the Display within Zoom Range checkbox. Click OK, then click OK in the Layer Control. The map will now be displayed regardless of scale.

 
   

To open larger scale raster maps which are downloaded in blocks, you can select multiple files in the File>Open dialog (remember to move the .tab files into the same folder as the raster images first). To display them as a single map, change the Preferred View in the Open dialog to Current Mapper, otherwise they will open in separate Mapper windows (see below):

 
   

If you are using raster data with vector data (e.g: overlaying your own data points on a raster background map), make sure the raster layer(s) is/are beneath the data layer(s). To check, open the Layer Control and move the raster layer(s) down, if necessary.

You can change the appearance of the raster layer(s) by opening the Layer Control, selecting a raster layer and then clicking the Display button. This opens the Raster Display Options dialog:

Click the Style Override checkbox, then click the chequerboard button below it to open the Adjust Image Styles dialog:

You can change the brightness and contrast of the image by moving the sliders. For a background image which is overlaid with data you will probably need to reduce the contrast and lighten the image slightly, so that the overlaid data is clearer.

If you are using the raster image above vector data, or overlaying it on another raster (such as geological data over a raster map), use the Translucency slider on the upper image to allow the lower image to show through (around 50% is usually about right).

Clicking the Transparent checkbox enables you to make a colour completely transparent (such as a raster map with a plain white background). However this is seldom successful as the result is either a ragged effect or speckling where the background is not a pure colour.

 
   
Remember that raster images cannot be edited in MapInfo. You can work on the image in Photoshop or another image editing program, but make sure you keep the same filename and format and do not crop, change the size or resolution as MapInfo will not then be able to display it correctly, or not at all.  

 
   
Part 2: Vector data  
(For Raster Data see Part 1)  
   
Vector datasets available from the OS Opendata website are currently in a range of formats: some are ESRI Shapefile and others NTF, DXF or ASCII text. MapInfo can open ESRI Shapefiles and ASCII text directly, but DXF has to be imported or converted and NTF converted before it can be used in MapInfo using a translator (such as the free NTF2MIF which can be downloaded here), so there are three different methods required and which one you use depends on the dataset.  
   
The method of opening each type of file is explained below:  
   

ESRI Shapefile format
NTF format
DXF format
ASCII text

 
   
ESRI Shapefiles (Boundary Line, Strategi, Meridian 2 etc)  
Shapefiles can be opened directly by changing the Files of type in the File Open dialog to Shapefiles, then selecting the file to open.  
Note that the table will not be editable, as MapInfo cannot edit Shapefiles (as of version 8.5, but this may change in later versions). To be able to edit them you have to convert the Shapefile to MapInfo format first, then open it as normal. This is explained further on.  
   

Before you can display the file, you will see the Shapefile Information dialog:

Click the Projection button and select British Coordinate Systems and British National Grid in the Choose Projection dialog, as the projection will otherwise be assumed to be the default (usually lon/lat) and the data will not display correctly:

Click OK to select the projection, then click OK in the Shapefile Information dialog to open the file.

 
NOTE: Shapefile datasets consist of a number of files, one for each feature type.Each file will open in the default style (normally a small star for points and black lines for polygons or polylines) so you will need to change the style once the file has been opened  
   

To change the style, open the Layer Control, selecting the layer and then click the Display button. This opens the Layer Options dialog.:

In the Layer Options dialog, click the Style Override checkbox, then change the style as required, by clicking the large button(s) below the checkbox.

When you have selected a new style, click OK to display it. Remember to save a Workspace (see the introductory guide on this website) or the style will not be retained. To make the style change permanent you will need to make the layer editable, select all the objects in the layer and change the style by using the Style button(s) in the Drawing toolbox See the MapInfo Guide Part Two for step-by-step instructions. However to do this you will need to convert the Shapefile and then open it, rather than simply opening it.

 
   
Converting Shapefiles to MapInfo format  
Files can be converted using the Universal Translator, which comes with MapInfo. It cannot however convert NTF files (for example Landform Panorama DTM) - to convert these download the free converter NTF2MIF from the Map Room website (it is also available on the MapInfo workstations in the Map Room).  
   

The Universal Translator is part of the MapInfo Tools. To load it, Open the Tools menu and click Tool Manager. Select Universdal Translator from the list and click both the checkboxes. This will load the tool automatically each time you use MapInfo in future:

Click OK. The Universal Translator will now be in the Tools menu.

 
   
To use the Universal Translator with ESRI Shapefiles, Select it from the Tools menu.

The various options should be selected as above.

Source Format should be ESRI Shape

File(s) are the Shapefile(s) to convert (multiple files can be selected)

Uncheck the Use projection setting in source file (as it is not always read correctly) and click the Projection button. This will open the Choose Projection dialog:


Projection should be British National Grid. You have to select both the Category and Category member, as shown above. Click OK to return to the Universal Translator and select the remaining settings:

Format should be MapInfo TAB

Directory is the location to save the converted files to (NOTE: you cannot create a new folder in Universal Translator - you have to do this first in My Computer before running the translator).

Log File can be left as the default (you can look at this if the translation fails to see what the problem was).

Click OK to start. When translation is complete (this may take quite a while if you are converting a large number of files) you will see this message:

Click OK.

Close the Universal Translator (unless you are converting more files) by clicking Cancel You can now open the converted file(s) as normal in MapInfo.

 
   
The data will be converted to MapInfo default styles, i.e: single black lines for all polylines (roads, railways, rivers etc) and small grey stars for all point data (towns, railway stations).Polygon features will be white areas with black borders. To change this to a range of styles and colours appropriate to the data type, you will have to edit the styles.  
   
   
To edit a feature style (for example A roads) follow these steps:  
   

1. Open the table in a mapper and make the layer editable (Map menu > Layer Control or right-click in the mapper window and select Layer control from the pop-up menu). In the Layer Control click the second checkbox next to the layer name, to make the layer editable.

 
   

2. To select all the objects in the layer (which may not be entirely visible in the mapper window), open the Query Menu and click Select... In the Select dialog, choose the table from the list in the Select Records from Table list and leave the that Satisfy: box blank. Store Results in Table can be left as it is, as you will not be saving the result of the query. Uncheck the Browse Results checkbox or you will get a browser window listing all the objects in the table, which you don't need to see. :

Click OK to select all the objects in the table.

 
   

3. Keep the objects selected (if you click anywhere in the Mapper window you will deselect them - if this happens just repeat step 2) and click the relevant Object Style button in the Drawing Toolbox - in this example the Line Style button (style buttons have a small ? on them):

There may be a delay if you are modifying a large number of objects. When the Line Style dialog appears, choose the style you require. In this example a double-line style in red:

Note that the Interleaved checkbox should be ticked with this style of line, to make a neat join between segments. Click OK to modify the style (again, this may take a while for a large number of objects). When the process is complete, deslect the objects by clicking on the background in the Mapper window, or click the Deselect Tool in the Main toolbox:

Save the file and uncheck the editable checkbox in the Layer Control to avoid accidentally moving or deleting objects.

Repeat these steps for each table. The process is similar for polygon and point objects. After selecting all the objects in a table, click the appropriate style button in the Main toolbox. Remember to save the tables and uncheck the editable checkbox in the Layer Control each time.

 

 
   
NTF Format files (Landform Panorama DTM)  

Landform Panorama DTM is supplied in acsii text or NTF formats. Ascii can be imported into MapInfo, but you them have to create points for the data. Also the files are in individual tiles and to work with DTM in MapInfo you need all the data in a single table, so you them have to add the tables together (using Table>Append Rows to Table).

It is easier to use the free converter NTF2MIF, which is available on the Map Room workstations and can also be downloaded here.

NTF2MIF converts and combines NTF files into a single MIF file, which can them be imported into MapInfo to create a TAB file.

 
   

To convert DTM files in NTF format, use NTF2MIF.

1. Select the file(s) to convert and choose a folder to store the created MIF/MID files:

Make sure that Merge files is selected in Output options and change the default MIF filename to something suitable (the default is the first DTM file with "etc" added).
You can keep the files separate if you wish by clicking the Separate tiles option, in which case the MIF/MID files will have the same name as the NTF files (the MIF file box is disabled and displays 'auto name' - the filenames are created automatically by NTF2MIF).

Click OK to translate the files.

 
   

2. When conversion is complete, import the MIF file into MapInfo. To do this:


Open the Table menu and click Import.
Change the Files of type to MapInfo Interchange [*.mif]).
Select the MIF file (ignore the file with "_text" added to it as DTM data does not have text objects) and click OK.
Choose a folder to save the TAB version in and save the file.

You can now open the TAB file as normal.

 

 
   
DXF Format Files (e.g: Landform Panorama Contours)  
Landform Panorama Contours is only supplied in DXF format (as of 2010). This format can be imported into MapInfo without conversion, but the height values are not imported (this may be a bug in some versions), so use the Universal Translator instead.  
   

1. To use the Universal Translator with DXF files, Select it from the Tools menu. (If it is not loaded see the instructions in the ESRI Shapefiles section). The various settings should be as follows:

Source Format should be AutoCAD DWG/DXF

File(s) are the DXF file(s) to convert - multiple files can be selected. Change the file type to DXF in the Select Input files dialog to see the files:


Uncheck the Use projection setting in source file checkbox and click the Projection button. In the Choose Projection dialog, select the Category and Category Members as below:

Click OK to return to the Universal Translator.

Format should be MapInfo TAB.

Log file can be left as the default (you can look at this if the translation fails to see what the problem was).

Directory is the location to save the converted files in (NOTE: you cannot create a new folder in Universal Translator - you have to do this first in My Computer before running the translator).

Universal Translator should now look like this:

Click OK to Start. When translation is complete (this may take a while) you will see this message:

Click OK.

Close the Universal Translator (unless you are converting more files) by clicking Cancel, then open the converted file(s) as normal in MapInfo.

 
   

Each DXF layer is converted to a separate TAB file named with the DXF layer name. As well as topographic features such as contours and water objects, they include a grid, grid labels and footnotes etc., which you probably won't need, especially if you are creating a map from more than one DXF file. The TAB files are as follows:

G8040200 - spot heights
G8040201 - contour lines
G8040202 - water features
G8040203 - break line
G8040204 - coastline
G8040205 - ridgelines
G8040207 - formlines
G8040571 - footnotes and grid labels
G8040572 - grid lines
G8040573 - grid values

So you can just open the files you need.

 

 
   
ASCII text (OS Locator and 1:50 000 Gazetteer) and CSV (Code-Point Open)  
Data in ASCII text or CSV format is just plain text with the data fields separated by a delimiting character. In the case of OS data this is either a colon or a comma. This type of data can be opened in a spreadsheet such as Excel or imported into a database. It can also be opened in MapInfo and then made into a mappable table by creating points.  
   
OS Locator and 1:50 000 Gazetteer  

1. Both these datasets are opened in the same way. Open the File menu and click Open. In the Open dialog, change the Files of type to Delimited ASCII [*.txt] to display the downloaded file:

Select the file and click Open. This displays the Delimited ASCII Information dialog:

Change the default delimiter from Tab (not to be confused with the MapInfo TAB format) to Other, then change the character in the box to a colon, as above. Leave the Use First Line for Column Titles unchecked, as there is no header row. Click OK.

 
   
2. It may take a short while to open, as these are very large files, but you will then see the data displayed in a browser.  
   
If the data is not in columns, but in a single, wide column, you have selected the wrong delimiter, so all the data has been put into a single field. Close the table (File > Close table, don't just close the window! - select the table from the list that is displayed if other tables are open as well).) and re-open the original TEXT file, not the tab file which has been created. You will be warned that a table already exists - just replace it.  
   

3. The data will be displayed in a number of columns. For OS Locator (as of 2010) these are:

  COL_1   Road name
  COL_2   Road classification
  COL_3   X coordinate (easting) of the centre point of the road
  COL_4   Y coordinate (northing) of the centre point of the road
  COL_5   X coordinate (easting) of the SW corner of a box containing the road
  COL_6   Xcoordinate (easting) of the NE corner of a box containing the road
  COL_7   Y coordinate (northing) of the SW corner of a box containing the road
  COL_8   Ycoordinate (northing) of the NE corner of a box containing the road
  COL_9   Null (in the full version of Locator it contains the postcode sector)
  COL_10   Settlement (town in which the location is)
  COL_11   Locality (name of the local area)
  COL_12   County or unitary authority in which the locality is
  COL_13   Local authority in which the locality is
  COL_14   1:10 000 map tile name
  COL_15   1:25 000 map tile name
  COL_16   Source of information

The essential fields required to map the points are COL_3 and COL_4 (the easting and northing of the centre point of the road). The other fields can be used as labels or to link to other data.

 
   

For the 1:50 000 Gazetteer, the columns are:

  COL_1   Record number
  COL_2   1km National Grid square containing the feature
  COL_3   Name
  COL_4   1:50 000 colour raster tile containing the location
  COL_5   Latitude (deg)
  COL_6   Latitude (min)
  COL_7   Longitude (deg)
  COL_8   Longitude (min)
  COL_9   Northings
  COL_10   Eastings
  COL_11   Position relative to Greenwich Meridian
  COL_12   County code (see OS user guide for info)
  COL_13   Abbreviated county name
  COL_14   Full county name
  COL_15   Feature code (See OS user guide for info)
  COL_16   Date record was last amended
  COL_17   Update code (whether record is new, amended or deleted since last update)
  COL_18   1st Landranger sheet the location appears on
  COL_19   2nd Landranger sheet the location appears on
  COL_20   3rd Landranger sheet the location appears on
 
   

4. The table can be made into a mappable table immediately, but as with other non-MapInfo formats it cannot be edited or fields re-ordered or modified. It is advisable to make a copy of the table first and use the copy to make into a mappable table, as subsequent changes can be made if necessary.

To make a copy:

Open the File menu and click Save Copy As... Save the table with a new filename (you cannot use the original name as a tab file has already been created with that name to link to the text file).

Close the table by opening the File menu and clicking Close table (select the table from the list if other tables are open as well). Don't just close the window as this will not close the table.

Open the copy table you saved.

 
   
5. You can now create points for the records in the table (If you don't wish to map the entire table, select the rows you need and save them as a new table. Close the full table and open the new one).  
   

6. To create points for your table, open the Table menu and click Create Points. This displays the Create Points dialog. It will look at this stage something like this:

There are several things to check and if necessary change before creating points as the options MapInfo has selected may be incorrect.

 
   
   

7. Starting at the top, make sure the correct table is selected (it may not be if there is more than one table open).
Next, click the using Symbol button and choose a suitable symbol. A small (6pt) bright-coloured filled circle is best.
The Get X Coordinates from Column should be the appropriate Eastings column (it is different in each dataset) and the Get Y Coordinates from Column should be the Northings. (In some versions of MapInfo you will asked if you wish to use the same column for both - just click OK to dismiss it and select the correct columns as normal).
Multipliers should be left as 1 (the coordinates are to 1m prescision).
Most importantly, click the Projection button and select British Coordinate Systems as the Category and British National Grid as the Category Member:

Click OK to set the projection.

You can now click OK in the Create Points dialog to create points for the locations.

 
   

8. Nothing appears to happen, but you now have symbols corresponding to the data records. To display them open the Window menu and click New Map Window. To view the entire dataset, right-click with the mouse in the map window and choose View Entire Layer from the pop-up menu.

If you already have a map window open, you can add the new data by right-clicking with the mouse and selecting Layer Control. Click the Add Layer button in the Layer Control and add the new data.

 

 

ESRI Shapefile format
NTF format
DXF format
ASCII text

Raster Data

 
   
   
This is a brief and specific guide to this topic, for more general information, see: MapInfo - an easy guide for new users  
Nigel James
Bodleian Library 2010
 
Bodleian Library Map Room