Bug report #3137
Save as shapefile fails if field names are longer than 10 characters
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Data Provider | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 13197 |
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?
Associated revisions
fix #3137
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15238 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #3137
git-svn-id: http://svn.osgeo.org/qgis/trunk@15238 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Paolo Cavallini about 14 years ago
BTW, the external plugin Table Manager fails to rename the fields, hanging QGIS
#2 Updated by Jürgen Fischer about 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.
#3 Updated by Paolo Cavallini about 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.
#4 Updated by Frank Warmerdam - about 14 years ago
If the ticket is filed against GDAL, I can have Chaitanya look into clean logic for disambiguation for shortened names.
#5 Updated by Jürgen Fischer about 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.
#6 Updated by Paolo Cavallini about 14 years ago
#7 Updated by Paolo Cavallini about 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
#8 Updated by Jürgen Fischer over 13 years ago
- Resolution set to fixed
- Status changed from Open to Closed
fixed in b642e809 (SVN r15239).