These notes outline how to load Building Height Attribute data into MapInfo using the .csv file you have received and/or altered. The notes have been prepared using version 16.0.0 of MapInfo (64-bit version).
How you have altered the TOID field in the .csv file will affect the methodology employed when importing the .csv file into MapInfo. If you have retained the raw GML TOID format or added leading zeroes into your TOID field, then MapInfo will automatically pick this up as a character field, so it can be added to MapInfo in the following process:
Navigate to the Open dialog box either by using the icon or by clicking File > Open.
Select Comma Delimited CSV (*.csv) from the Files of type drop-down, then navigate to where the .csv file is stored.
Select the .csv file you wish to open and click Open.
The Open dialog box will close, and a Comma Delimited CSV Information dialog box will appear. Ensure the Use first line for column titles check box is ticked, then click OK to close the dialog box and open the .csv file.
The TOID field should be formatted as a text string and should include leading zeroes.
If you have removed ‘osgb’ but not added any leading zeroes, please follow the steps outlined above. You should see that the TOIDs are formatted as numbers and contain decimal places. If you then navigate to the directory where you have stored the .csv file, you should see that MapInfo has created a .TAB file with the same name as the .csv file. When this .TAB file is opened within a text editor, something similar to the text below should be displayed:
Note: The field types may vary depending on previous processing. The section of code within the chevrons refers to the file name of the Building Height Attribute .csv.
As you can see here, the field OS_TOPO_TOID has a data type of ‘Integer’.
Manually change this in the text editor to Char (20) ; to specify this field type as text, then save the .TAB file before closing.
Close the original .csv file displayed in MapInfo by selecting File > Close Table.
Open the .TAB file that you just edited. The TOID field should now be formatted correctly, and you can use this .TAB file to join to the OS MasterMap Topography Layer data holdings.
Note: If you re-open the .csv file in MapInfo and choose to overwrite the table, the TOID field will be formatted as a number again. Instead, you should use the .TAB file rather than the .csv file.
Now you have loaded the .csv file, you will need to export it as a .dbf (dBASE DBF) file and create an index on the TOID column in the table. To do this, follow these steps:
In the ribbon toolbar, select the Table tab and then select Export. Navigate to where you wish to save the .dbf. Ensure the Save as type is set to dBASE DBF (*.dbf).
Select the Table tab in the ribbon menu, then select Table and from that drop-down, select modify structure, which opens the Modify table structure dialog box.
Ensure you have opened the table structure for the Building Height Attribute data because this is the data we want to create an index on. For the column of data containing the TOID value, tick Indexed box. Apply this index by clicking OK.