You are currently reviewing an older revision of this page.
VRT files are used to import a CSV file containing point, line or polygon data. Information regarding the VRT file format and parameters can be found at the following:
www.gdal.org/.../drv_vrt.html
http://www.gdal.org/ogr/
The attached zip file to this article includes a sample set of CSV files and a related VRT described as follows:
<OGRVRTDataSource> <OGRVRTLayer name="Linestrings"> <SrcDataSource relativeToVRT="1">linestrings.csv</SrcDataSource> <GeometryType>wkbLineString</GeometryType> <LayerSRS>WGS84</LayerSRS> <GeometryField encoding="WKT" field="WKT"/> </OGRVRTLayer> <OGRVRTLayer name="Polygons"> <SrcDataSource relativeToVRT="1">polygons.csv</SrcDataSource> <GeometryType>wkbPolygon</GeometryType> <LayerSRS>WGS84</LayerSRS> <GeometryField encoding="WKT" field="WKT"/> </OGRVRTLayer> <OGRVRTLayer name="Points"> <SrcDataSource relativeToVRT="1">points.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> <LayerSRS>WGS84</LayerSRS> <GeometryField encoding="PointFromColumns" x="X" y="Y"/> </OGRVRTLayer> </OGRVRTDataSource>
...which makes use of WKT geometry field encoding for points, lines and polygons. After opening the example VRT file, the "Interoperability" application displays the following...
...with an "Import" resulting in the following feature instances...
...and "Analyze Feature" showing both business and geometric properties, as well as the WKT property...
...which you may want to disable in the "Interoperability" application prior to performing the "Import" operation. This can be accomplished by using the "Show Properties - Ungrouped' option, and 'unchecking' the WKT item.
---
Re: VRT File Parameters by RodWing:
Thanks Jeff!