[gdal-dev] couldn't create vrt file

Even Rouault even.rouault at mines-paris.org
Sun Jun 27 13:32:42 EDT 2010


Ahmet,

There are 2 issues :

* one with the CSV file

You should remove the simple quotes after POLYGON(( and before )), but enclose 
the whole WKT inside ASCII double quotes, like this :

"Record_Id","wkb_Polygon"
"1","POLYGON((501453.34 4800585.97,501576.14 4800590.44,501569.85 
4800522,501471.61 4800521.63,501453.34 4800585.97))"

* one with the VRT file

You have used the non-ASCII double quote character on the <GeometryField> 
line. Replace them with the ASCII double quote character

<OGRVRTDataSource>
             <OGRVRTLayer name="polygon1">
                <SrcDataSource >polygon1.csv</SrcDataSource>
                <GeometryType>wkbPolygon</GeometryType>
                <FID>Record_Id</FID>
                <GeometryField encoding="WKT" field="wkb_Polygon"/>
                <LayerSRS>EPSG:32636</LayerSRS>
            </OGRVRTLayer>
</OGRVRTDataSource>

Best regards,

Even


More information about the gdal-dev mailing list