C# Класс OSCodePointDataImport.OSDataImporter

Показать файл Открыть проект

Защищенные методы

Метод Описание
ConvertToLonLat ( double northing, double easting ) : TDPG.GeoCoordConversion.PolarGeoCoordinate

Converts northing and easting coordinates into Longitude/Latitude coordinates in the WGS84 coordinate system.

CreateSpatialIndex ( SqlConnection connection, string schemaName, string tableName ) : void

Creates a spatial index on the GeoLocation column.

LoadRowsToDatabase ( SqlConnection connection, DataTable data, string schemaName, string tableName ) : int

Loads the supplied data to the newly created table in the database.

SetForeignKey ( SqlConnection connection, string schemaName, string primaryKeyTableName, string primaryKeyColumnName, string foreignKeyTableName, string foreignKeyColumnName ) : void

Adds a foreign key constraint.

SetGeoColumn ( SqlConnection connection, string schemaName, string tableName ) : void

Set the GeoLocation column in the supplied table, to a GEOGRAPHY point based on the Latitude and Longitude columns

SetPrimaryKey ( SqlConnection connection, string schemaName, string tableName, string pkColumnNames ) : void

Sets the primary key on the supplied table

Приватные методы

Метод Описание
ExecCommand ( SqlConnection connection, string commandText ) : void

Executes the supplied SQL.

Описание методов

ConvertToLonLat() защищенный Метод

Converts northing and easting coordinates into Longitude/Latitude coordinates in the WGS84 coordinate system.
protected ConvertToLonLat ( double northing, double easting ) : TDPG.GeoCoordConversion.PolarGeoCoordinate
northing double northing coordinate
easting double easting coordinate
Результат TDPG.GeoCoordConversion.PolarGeoCoordinate

CreateSpatialIndex() защищенный Метод

Creates a spatial index on the GeoLocation column.
protected CreateSpatialIndex ( SqlConnection connection, string schemaName, string tableName ) : void
connection System.Data.SqlClient.SqlConnection db conneciton to run the command against
schemaName string schema name
tableName string table name
Результат void

LoadRowsToDatabase() защищенный Метод

Loads the supplied data to the newly created table in the database.
protected LoadRowsToDatabase ( SqlConnection connection, DataTable data, string schemaName, string tableName ) : int
connection System.Data.SqlClient.SqlConnection SQL Server database connection
data System.Data.DataTable DataTable containing the data to load
schemaName string name of schema the table belongs to
tableName string table to load the data to
Результат int

SetForeignKey() защищенный Метод

Adds a foreign key constraint.
protected SetForeignKey ( SqlConnection connection, string schemaName, string primaryKeyTableName, string primaryKeyColumnName, string foreignKeyTableName, string foreignKeyColumnName ) : void
connection System.Data.SqlClient.SqlConnection db connection to run the command against
schemaName string schema name
primaryKeyTableName string name of the primary key table
primaryKeyColumnName string name of the primary key column
foreignKeyTableName string name of the foreign key table
foreignKeyColumnName string name of the foreign key column
Результат void

SetGeoColumn() защищенный Метод

Set the GeoLocation column in the supplied table, to a GEOGRAPHY point based on the Latitude and Longitude columns
protected SetGeoColumn ( SqlConnection connection, string schemaName, string tableName ) : void
connection System.Data.SqlClient.SqlConnection db connection to use
schemaName string name of schema the table belongs to
tableName string name of table to update
Результат void

SetPrimaryKey() защищенный Метод

Sets the primary key on the supplied table
protected SetPrimaryKey ( SqlConnection connection, string schemaName, string tableName, string pkColumnNames ) : void
connection System.Data.SqlClient.SqlConnection db connection to use
schemaName string name of schema the table belongs to
tableName string name of the table to add the PK constraint on
pkColumnNames string column or columns that form the PK
Результат void