Opened 14 years ago
Closed 14 years ago
#3137 closed bug (fixed)
Save as shapefile fails if field names are longer than 10 characters
Reported by: | pcav | Owned by: | nobody |
---|---|---|---|
Priority: | major: does not work as expected | Milestone: | Version 1.6.0 |
Component: | Data Provider | Version: | |
Keywords: | Cc: | warmerdam, borysiasty | |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
If I try to save the attached MapInfo file, I get:
Export to vector file failed. Error: trimming attribute name 'PM10_AVG_max' to ten significant characters produces duplicate column name.
and export fails. It seems a limitation of OGR, but perhaps we could be smarter and replace the last character with a serial. Otherwise better forward this ticket to GDAL trac?
Attachments (1)
Change History (9)
by , 14 years ago
Attachment: | contour.mif.zip added |
---|
comment:1 by , 14 years ago
Cc: | added |
---|
comment:2 by , 14 years ago
Replying to pcav:
and export fails. It seems a limitation of OGR, but perhaps we could be smarter and replace the last character with a serial.
AFAIK it's not a limitation of OGR, but a limitation of D-Base format.
comment:3 by , 14 years ago
I mean: the lack of a proper truncation method, adding a serial in case of too long field names, may be a limitation of OGR.
comment:4 by , 14 years ago
If the ticket is filed against GDAL, I can have Chaitanya look into clean logic for disambiguation for shortened names.
comment:5 by , 14 years ago
If this is fixed in OGR we need to keep in mind to adapt http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsvectorfilewriter.cpp#L312 accordingly.
comment:7 by , 14 years ago
Apparently the problem has been solved in GDAL 1.7. The method in QGIS should then be updated. See http://trac.osgeo.org/gdal/ticket/3796#comment:1
BTW, the external plugin Table Manager fails to rename the fields, hanging QGIS