Opened 8 years ago

Closed 8 years ago

#4654 closed defect (fixed)

ogr2ogr not handling null column name values in CSV

Reported by: andrewxhill Owned by: warmerdam
Priority: normal Milestone: 1.9.1
Component: OGR_SF Version: unspecified
Severity: normal Keywords: csv

Description (last modified by andrewxhill)

Data exported from R (and others I'm sure), will often contain a null column name over an ID column. Something like,

"", "Name","Species", "Geom"
1, "Boxelder", "Acer negundo", "some geom"
2, "Juneberry", "Amelanchier arborea", "some geom"

These files are imported to PostgreSQL (via -f "PostgreSQL") incorrectly. The data are shifted over one column, and one column is dropped. Alternatively, in the quoted example above, even a space will make the file work correctly,

" ", "Name","Species", "Geom"
1, "Boxelder", "Acer negundo", "some geom"
2, "Juneberry", "Amelanchier arborea", "some geom"

Change History (2)

comment:1 Changed 8 years ago by andrewxhill

Description: modified (diff)

comment:2 Changed 8 years ago by Even Rouault

Component: UtilitiesOGR_SF
Keywords: csv added; ogr2ogr removed
Milestone: 1.9.1
Resolution: fixed
Status: newclosed

Fixed in trunk (r24381) and branches/1.9 (r24382)

Note: See TracTickets for help on using tickets.