Method | Description | |
---|---|---|
LoadData ( |
||
LoadData ( string serverName, string databaseName, string schemaName, string tableName, string dataFileDirectory, string columnHeadersCsvFile ) : int |
Loads Code-Point CSV data files into a new table in SQL Server, converting the provided Eastings & Northings coordinates into WGS84 Lon/Lat coordinates.
|
Method | Description | |
---|---|---|
CalculateDistrictsAndSectors ( |
Calculates a simple average Lon/Lat for each postcode district (e.g. AB12) and sector (e.g. AB12 3), and creates a row in the db table for each one.
|
|
PrepareTable ( |
Creates a new table in the database ready to receive the Code-Point data.
|
|
ReadColumnHeaders ( string columnHeadersCsvFile ) : int>.Dictionary |
Looks in the CSV headers file supplied with the Code-Point data download, and extracts all the columns defined with their index position.
|
|
ReadDataFromFiles ( string directory, int>.Dictionary |
Reads in all .csv files in the supplied directory, converts the Eastings & Northings coordinates into the WGS84 Lon/Lat system and stores each Post Code with the Lon/Lat coordinates in memory in a DataTable.
|
public LoadData ( |
||
options | ||
return | int |
public LoadData ( string serverName, string databaseName, string schemaName, string tableName, string dataFileDirectory, string columnHeadersCsvFile ) : int | ||
serverName | string | SQL Server name |
databaseName | string | database to load the data into |
schemaName | string | schema to create table in |
tableName | string | table name to create and load the data into. The table must not already exist. If it does already /// exist, an exception will be thrown. |
dataFileDirectory | string | directory where the Code-Point CSV data files are |
columnHeadersCsvFile | string | CSV file containing the column header definition for the Code-Point CSV data files. /// Should be in ..\Doc\Code-Point_Open_column_headers.csv |
return | int |