Processing OS Codepoint Data

Working in a professional GIS environment,you will undoubtedly be dealing with Ordnance Survey data – whether open or private. One of the most useful of these is OS codepoint which provides a precise geographical location for 1.6 million postcodes within Great Britain.

This is the basis for geocoding, one of the most commonly completed tasks in GIS. This posts describes the method for creating an address locator ready for geocoding.

1. Firstly, load the data from the CD and delete (or use to a create a new address locator) the bt.csv file which represents Northern Ireland.

2. Then merge the csv’s together using the command line (make sure you are in the directory where the files are stored).

copy *.csv insert_new_file.csv

3. Add this data into notepad software (too large for excel) and add in the headings below on the top row :

"PC","PQ","PR","TP","DQ","RP","BP","PD","MP","UM","EA","NO","CY","RH","LH","CC","DC","WC","LS"

Check at the end and remove “sub” if found.

4. At this stage it is good to check whether we have captured all the code points. So open the metadata text file from the disc (under Doc), remove ‘bt’ from the list and sum the values after each abbreviation (TOTAL_SUM) by copying this data into Excel. This number should equal the number of rows (minus one for heading) in the text document  you have just edited. If not, all the CSV files have not been merged. If so, continue.

5. For creating an address locator in ArcMap, convert the merged document to single geodatabase within arcatalog which will give you a table with total entries that match TOTAL_SUM (note: you will need to create the geodatabase for which the table will be saved in).

6. Convert this table to XY data by using ‘CREATE FEATURE CLASS’ making sure you use the field ‘EA’ for X and ‘No’ for Y and set ‘Coordinate System of Input Coordinates’ to British National Grid. This data is now ready to be made into an address locator. (NB If you choose to add the data as X Y coordinates in Arcmap and then save as a feature class instead – be prepared to wait for a long time!)

7. Once created, check that the number of entries in the attribute table = TOTAL_SUM.

Advertisements

2 thoughts on “Processing OS Codepoint Data

  1. Pingback: Geocoding | geospatial wandering

  2. Pingback: Processing OS Codepoint with polygons | geospatial wandering

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s