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

Even Rouault even.rouault at mines-paris.org
Sat Jul 13 01:19:35 PDT 2013


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

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list