[gdal-dev] Convert a csv text file in a dbf file

aperi2007 aperi2007 at gmail.com
Sat Jul 20 17:08:58 PDT 2013


Hi, Rouault

it work well.

I see it want necessary the first line with titles.
To avoid it the docs say to use an integer field.
This is not my situation.
I have a file with all text fileds but without a title in the first line.

There is a parameter to avoid the first line of fileds-name ?

Thx,

Andrea.

On 13/07/2013 10:19, Even Rouault wrote:
> Le samedi 13 juillet 2013 08:46:10, Andrea Peri a écrit :
>> Hi,
>>
>> I have a csv text file without any geometric field.
>>
>> I need to convert it in a simple dbf file.
>>
>> Is this possible to do with ogr2ogr ?
> Yes
>
> $ cat nogeom.csv
> id,foo
> 1,bar
>
> $ ogr2ogr nogeom.dbf nogeom.csv
>
> $ ogrinfo nogeom.dbf -al
> INFO: Open of `nogeom.dbf'
>        using driver `ESRI Shapefile' successful.
>
> Layer name: nogeom
> Geometry: None
> Feature Count: 1
> Layer SRS WKT:
> (unknown)
> id: String (80.0)
> foo: String (80.0)
> OGRFeature(nogeom):0
>    id (String) = 1
>    foo (String) = bar
>
>
>
>> Thx



More information about the gdal-dev mailing list