Map Room Home page  
written by Nigel James
 
Contents
 
   
MAPINFO How to...  
No. 12: Creating data files for use in MapInfo  
   
   
Data files can be created in a spreadsheet such as Excel, but must be correctly formatted and saved, otherwise MapInfo will not be able to read them. Although MapInfo can read Excel files, it can have problems, so it is preferable to save them as delimited text files instead.This is explained further on.  
   
The MapInfo tool Conversion Tools will be required to make your tables mappable and it can be downloaded from the geo tools section of the Map Room.  
   
Data files will normally be of two types:  

Point data is used to plot locations - for displaying the spatial distribution of sites, at specified coordinates.

Regional (or zonal) data is used to produce ranged thematic maps - for example countries shaded according to population size. Only one data variable can be displayed at one time. To display multiple variables, you can use pie, bar or proportional symbol charts which are displayed at the centroids of polygons (e.g: the centre of each country).

 

 
Creating your table  
   
Point data maps  
Point data maps display a symbol at a specified location. This can be an Ordnance Survey or other grid reference, or geographic (lat/lon) coordinates. You can also use non-earth coordinates for very large scale maps such as room plans or archeological digs. (Non-earth coordinates cannot be used with conventional map tables as they do not have a projection).  
   
Latitude/Longitude tables  
A lat/lon data table should look like this:  
 
Note the following points:  
  No blank rows
  No fancy formatting
  First line contains column titles which must start with a letter
  Appropriate hemisphere (i.e: N, S, E, W) included at end of each coordinate
  Coordinate style can be mixed, i.e: degrees:minutes:seconds, degrees:minutes only or degrees and decimal minutes
  The same separator(colon, semicolon) must be used throughout the table
  No spaces
 
Mixed coordinates are not a problem - Conversion Tools converts the data to the best possible precision.  
Now see Saving your table for information about file formats  
   
OS Grid Reference tables  
An OSGR table should look like this:  
 
Note the following points:  
  No blank rows
  No fancy formatting
  First line contains column titles which must start with a letter
  Grid references can be 2, 4, 6 or 8 digits but must have the two prefix letters
  Spaces are allowed
 
All grid references will be converted to metres and padded with zeros if necessary. A grid reference SP514062 for example will be converted to Eastings: 451400 Northings: 406200.  
Now see Saving your table for information about file formats  
   
Ranged thematic, pie, bar or proportional symbols map  
   
To produce a ranged thematic map, or pie and bar chart maps etc., there must be a column of data common to both your table and the map. For example, to map data on a world map, you need a column in your data table containing country names, which MapInfo will use to join your data to the map, using the country names in the MapInfo world map table. This type of table does not need converting before it can be used in MapInfo.  
   
This is how a thematic table should look:  
 
Note the following points:  
  No blank rows
  No fancy formatting
  First line contains column titles which must start with a letter
  Do not mix numbers and text variables in columns - each column should be of one type only
 
A ranged thematic map can also be used to map by postcodes for example - in which case it should the same style, but using postcodes instead of countries, or region names for sub-national mapping. When creating data tables for ranged thematic or pie charts etc., it is important that the names in your table match exactly the names in the appropriate map table. For example, if you have a postcode OX4, this will not match, because the postcodes map tables will have OX 4.
Always look at the attributes of the map tables before preparing your data. You can do this by opening the map table in MapInfo, selecting Browser in the Preferred view option. This will display the attribute data and you can see how they are formatted.
 

 
   
Saving your table  

MapInfo can import tables in Excel, Dbase or Access, but you may have problems with some versions of these. To avoid difficulties, save your tables as delimited text files. A delimited text file is in plain text format with a separator (delimiter) such as a tab or comma between each field. If the Ranged Thematic table above was saved as a comma-delimited text file, it would look like this:

Country,Variable_1,Variable_2,Variable_3
Algeria,38937565,97745,53293856
Belgium,33746,987856,3348
Greece,884465,394576,5875
Zambia,4847,494457,45035

 
An important point to remember when using Excel is that it is a spreadsheet, not a database. This means that field formatting (particularly size) is not saved, which can result in truncation of long text strings. This is why you should use the delimited text file format, as this avoids the problem.  
   
Many users have Excel and use this to create tables. When you save the table, it must be saved in text-delimited format. This means selecting Text (tab-delimited) in the Save dialog in Excel. Doing this will enable MapInfo to open the table correctly:  
 
   

Save Point data files as separate files (one file for each data type). For example, if you have points representing 19th century sites and 20th century sites, save them separately. You can then display them simultaneously on a map but with different symbol styles for each table.

For ranged thematic and pie chart etc. maps, put all you data into a single table. You can then select a single variable for ranged thematic maps and multiple varibales for pie and bar charts.

 
   
Nigel James
Bodleian Library 2001
Bodleian Library Map Room