You are currently reviewing an older revision of this page.
To enable the CSV to be importable, you must first create the .vrt file, which can be done in any simple text editor. The VRT file is a small piece of xml and looks like this: <OGRVRTDataSource> <OGRVRTLayer name = "testCoords"> <SrcDataSource>testCoords.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> <LayerSRS>WGS84</LayerSRS> <GeometryField encoding="PointFromColumns" x="longitude" y="latitude"/> </OGRVRTLayer> </OGRVRTDataSource> To create your VRT do the following: 1. Copy /paste the above code into a text editor (such as notepad). 2. Adjust the following variables in the xml code
OGRVRTLayer name Should be the same as the name in "SrcDataSource" but WITHOUT the ".csv" suffix. SrcDataSource Should be the exact name of the file, with the .csv extension GeometryType As shown in the code, it is unknown to the author at this stage if other geometry types are available. LayerSRS Must be the correct coordinate system reference - NOTE: SO FAR ONLY "WGS84" HAS FOUND TO WORK FOR THIS SO FAR GeometryField Keep the encoding value as it is ("PointFromColumns"), but adjust the x & y values to the correct column names in your csv file. 3. Now save the file to the SAME DIRECTORY as yours .csv file, but be sure to set the "files of type" to "all Files, and add the ".vrt" file extension to the end of the file name. 4. You can now open the VRT file through the Interoperability window 5. Once you have imported the GIS data, you can use the data browser functionality to browse, search and filter, and locate individual records.
Source :
http://communities.bentley.com/products/geospatial/desktop/f/5924/t/115601