[Gdal-dev] CSV of Linestring

Frank Warmerdam warmerdam at pobox.com
Fri Nov 4 09:54:12 EST 2005


On 11/4/05, Jørn Vegard Røsnes <jorn at spacetec.no> wrote:
> Hi all/Frank,
>
> one probably small issue, the VRT driver seems to interpret my Linestrings as
> normal Strings
>
> ogrinfo <shapefile>
> <snip>
> id: String (80.0)
> LINESTRING: String (80.0)
> OGRFeature(internationals):0
>   id (String) = 1
>   LINESTRING (String) = LINESTRING (1182671.21 7954218.71
...
> my VRT file:
> <OGRVRTDataSource>
>     <OGRVRTLayer name="internationals">
>         <SrcDataSource
> relativeToVRT="0">/path/to/international.csv</SrcDataSource>
>         <SrcLayer>international</SrcLayer>
>         <GeometryType>wkbLineString</GeometryType>
>         <GeometryField encoding="WKB" field="LINESTRING"/>
>         <LayerSRS>epsg:32633</LayerSRS>
>     </OGRVRTLayer>
> </OGRVRTDataSource>
>
> All ideas are welcome?
> I've also tried different names for the WKB-field than "LINESTRING".

Jørn,

As I think you noted in your later email, you want encoding="WKT"
not encoding="WKB".  However, there is currently no way to stop the
geometry field from also coming through as a regular field in the
VRT output (I think).

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list