Opened 12 years ago

Closed 12 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
Cc:

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 by andrewxhill, 12 years ago

Description: modified (diff)

comment:2 by Even Rouault, 12 years ago

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.