10.5.1 Creating Neighbouring Look-up tables with Program 'get-neighbour-regions.py'

As discussed in Section 10.2.2, the geocoding process uses neighbouring look-up tables for postcodes and localities (suburb and town names) in order to improve the geocode matching quality.

These neighbouring region look-up tables can be created with the program get-neighbour-regions.py. It uses MapInfo10.3 files containing boundary information for regions (either postcodes or localities), and creates text files containing regions and their direct (and possibly indirect) neighbours.

The program can be started from the command line using

python get-neighbour-regions.py mid_file mif_file direct_neighbour_file [indirect_neighbour_file]
The command line arguments that need to be given are: The program assumes that the first (quoted) element in each line (assuming comma separated values) in the MID file are the region names.


A commercial GIS system, see http://www.mapinfo.com/ for more details.