Page Properties | ||||||
---|---|---|---|---|---|---|
| ||||||
|
...
- Create a file called test.vrt with the following content.
Note |
---|
You MUST Typically you would give the control file the same name as the .csv file (discounting the extension). |
Code Block | ||||
---|---|---|---|---|
| ||||
<OGRVRTDataSource> <OGRVRTLayer name="test"> <SrcDataSource>C:\test\test.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> <LayerSRS>EPSG:27700</LayerSRS> <GeometryField encoding="PointFromColumns" x="easting" y="northing"/> </OGRVRTLayer> </OGRVRTDataSource> |
OGRVRTLayer
Enter a name for the Layer. This must MUST have the same name as the csv file (discounting the extension).
SrcDataSource
Enter the path to your CSV file.
GeometryType
As we are importing Point data this will be wkbPoint.
LayerSRS
This needs to be left as EPSG:27700 for British National Grid.
GeometryField
Make sure that the GeometryField encoding x & y entries match the names of your easting and northing columns respectively.
...
Now in Studio select to create a Spatial Data Transformation Task.
Task Name
Enter a name for the task.
Source Data
Select Comma-Delimited Text File as the list.
...
Code Block | ||
---|---|---|
| ||
<FileConType> <Name>Comma-Delimited Text File</Name> <FormatName>CSV</FormatName> <Direction>Both</Direction> <FileFilter>Comma-Delimited Text files (*.csv)|*.csv</FileFilter> </FileConType> |
Filename
Enter the path to the .vrt file for the csv file you wish to Import.
Output
Select the PostgreSQL database where you wish to store this data.
Table
Enter the table name where you wish to store the data in the database.
...