CSV for LineString

Jørn Vegard Røsnes jorn at SPACETEC.NO
Mon Oct 24 07:57:31 PDT 2005


Hi,

does anyone knows how a comma separated value (CSV) file looks for LineString 
coordinates, if it shall be accepted by ogr2ogr with CSV-driver and 
VRT-driver?

I've tried the following:

CSV file:
coor
(-233950.35 6518319.86, -213912.58 6338485.11, -222473.01 6329200.33)
(-222837.63 6329611.25, -222677.18 6329330.43, -222611.28 6329508.51, 
-222507.84 6329300.95)

VRT file:
<OGRVRTDataSource>
    <OGRVRTLayer name="internationals">
        <SrcDataSource 
relativeToVRT="0">/home/jorn/ogr_trials/international_test.csv</SrcDataSource>
        <SrcLayer>international_test</SrcLayer>
        <GeometryType>wkbLineString</GeometryType>
        <GeometryField encoding="WKT" field="coor"/>
        <LayerSRS>epsg:32633</LayerSRS>
    </OGRVRTLayer>
</OGRVRTDataSource>

Output:
ogr2ogr internationals international.vrt
ERROR 1: Failed to open datasource 
`/home/jorn/ogr_trials/international_test.csv'.
FAILURE:
Unable to open datasource `international.vrt' with the following drivers.
-> VRT
-> CSV
+++


I've done something similar with points successfully, but I can't find 
information about LineStrings and Polygons.
I'll also be happy for some links to such information.

Best Regards
Joern Vegard Roesnes



More information about the MapServer-users mailing list