Sunday, 27 March 2011

OS Data Importer Supports Scale Gazetteer Dataset

I've just pushed some updates to GitHub for the Ordnance Survey Data Importer .NET app I've been working on every now and then (see my previous posts: GB Post Code Geographic Data Load to SQL Server using .NET and OS CodePoint Data Geography Load Update).

Aside from a little re-jigging to potentially pave the way to load more Ordnance Survey data files to SQL Server in the future, it now supports importing the 1:50000 Scale Gazetteer data file to SQL Server (available to download from here). To quote the Ordnance Survey site:
The 1:50 000 Scale Gazetteer is a reference tool or location finder, similiar to the index in a road atlas. It can be used as a simple list to find out relevant coordinates and six-figure grid references for a town or area.
At the time of this post this data file contains 259,113 locations taken from the OS Landranger Map series.

Example Use
To load the 1:50000 scale gazetteer data file that has been downloaded and extracted to C:\OSGazetteerData\50kgaz2010.txt, into dbo.Gazetteer table in MyDatabase on server SQLServerA, and load county codes into table: County and feature codes into table: Feature, run the following from the command prompt:
OSCodePointDataImport.exe GAZETTEER SQLServerA MyDatabase dbo Gazetteer County Feature "C:\OSGazetteerData\50kgaz2010.txt"
The Gazetteer database table will consist of the following columns:
SeqNo INTEGER PRIMARY KEY
PlaceName VARCHAR(60)
CountyCode CHAR(2) FK to County.Code
FeatureCode VARCHAR(3) FK to Feature.Code
Longitude FLOAT
Latitude FLOAT
GeoLocation GEOGRAPHY
The County lookup table will consist of the following columns:
Code CHAR(2) PRIMARY KEY
Name VARCHAR(60)
The Feature lookup table will consist of the following columns:
Code VARCHAR(3) PRIMARY KEY
Description VARCHAR(50)

The source is on GitHub here: https://github.com/AdaTheDev/Ordnance-Survey-Code-Point-Data-Importer

No comments:

Post a Comment