[Gdal-dev] Limited type support in OGR CSV driver

Frank Warmerdam fwarmerdam at gmail.com
Mon Jun 20 13:48:40 EDT 2005


On 6/17/05, Sebastien Grignard <sebastien.grignard at archivideo.com> wrote:
> Hello.
> I've added type support for the CSV driver.
> With these patches you can now write a little csv help file to indicate
> the columns types to OGR.
> It works as follow :
>   - suppose you have a foobar.csv file that looks like this :
>     "ID","X","Y","AREA","NAME"
>     "1","1023.5","243.56","675","FOOBAR"
>     ...
>   - now write a foobar.csvt file like this one :
>     "Integer","Real","Real","Integer","String"
> The driver will then use the types you specified for the csv columns.
> The only types recognized are Integer,Real and String.

Sebastien, 

I have applied this change.  There have been somewhat 
similar proposals before, but what I like about yours is that it
depends on an optional external file so simple access still works
as it did. 

Would you consider submitting a patch for drv_csv.html describing
the feature for users?  Does the csv driver write these files out too?
If you were feeling really ambitious you could even supply additions
to gdalautotest/ogr/ogr_csv.py testing the new capabilities.

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