Opened 16 years ago

Closed 16 years ago

#2142 closed enhancement (fixed)

[PATCH] define field width via .csvt text file

Reported by: klewis Owned by: Even Rouault
Priority: normal Milestone: 1.6.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: csvt field width
Cc: warmerdam

Description

When converting a CSV file to DBF or joining a CSV file to a Shapefile each String field width is 80 character. Can the width be specified in a .csvt file? The default String width will remain at 80 char? It would be nice to also define the decimal places of a Real datatype. For example,

"String (10)","Real (12.9)","String (200)"

Thank you.

Keith

Attachments (1)

gdal_svn_trunk_csv_field_width.patch (1.8 KB ) - added by Even Rouault 16 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by warmerdam, 16 years ago

Type: defectenhancement

Keith,

I had previously understood you were having problem with field width support in .csvt files, but I see this is really a request for an enhancement. I'll reclassify it as such, but I don't anticipate any action on it in the near future.

comment:2 by Even Rouault, 16 years ago

Summary: define field width via .csvt text file[PATCH] define field width via .csvt text file

The attached patch should do.

by Even Rouault, 16 years ago

comment:3 by warmerdam, 16 years ago

Cc: warmerdam added
Owner: changed from warmerdam to Even Rouault

Even,

This looks good to me. Feel free to commit it as long as you add something for this feature in the test suite and document it in the user docs.

comment:4 by Even Rouault, 16 years ago

Component: defaultOGR_SF
Keywords: csvt field width added
Milestone: 1.6.0
Resolution: fixed
Status: newclosed

Applied in trunk in r13607 and test added in r13608

Note: See TracTickets for help on using tickets.