[QGIS-trac] Re: [Quantum GIS] #2151: "Save as shapefile..." truncates field names, sometimes causing duplicates

Quantum GIS qgis at qgis.org
Mon Nov 30 10:55:40 EST 2009


#2151: "Save as shapefile..." truncates field names, sometimes causing duplicates
-----------------------------------------------------+----------------------
        Reporter:  dmorissette                       |         Owner:  nobody       
            Type:  bug                               |        Status:  closed       
        Priority:  major: does not work as expected  |     Milestone:  Version 1.4.0
       Component:  Vectors                           |       Version:  HEAD         
      Resolution:  fixed                             |      Keywords:               
Platform_version:                                    |      Platform:  Debian       
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by dmorissette):

 I see that you produce a fatal error if duplicates are found, which is way
 better than silently producing an invalid output. However, the day OGR is
 fixed to automatically rename the fields, QGIS won't be able to benefit
 from that fix...

 If I'm not mistaken (and I'd love to be proven wrong), the current fix
 (ErrAttributeCreationFailed) forces users to rename the fields in the
 source before the conversion if they want to export to shapefile, which is
 not always possible if they connect to a DB or other data source with a
 schema that they do not control. I believe in the long run it would be
 better to either support renaming the fields automatically in QGIS (e.g.
 add a unique number at the end of dups to make them unique), or to be able
 to let OGR do it for us once http://trac.osgeo.org/gdal/ticket/3247 is
 fixed.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2151#comment:2>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list