Opened 13 years ago

Closed 13 years ago

#3373 closed patch (fixed)

fTools buffer geoprocessing error with certain data

Reported by: samrae29 Owned by: cfarmer
Priority: minor: annoyance Milestone: Version 1.7.0
Component: fTools Version: 1.6.0
Keywords: fTools Cc:
Must Fix for Release: Yes Platform: Debian
Platform Version: Awaiting user input: no

Description

Buffering fails if shapefile has two columns with the same name. This error did not occur in previous QGIS releases (v1.2 ?), but has been found in QGIS 1.6.

Steps:

  1. Open buffer(s) dialog: Vector > Geoprocessing tools > Buffer(s)
  2. Input vector layer selected has two columns with the identical column name.
  3. Choose output file and buffer distance e.g. 0.0005, and leave other defaults.
  4. For "Would you like to add the new layer to TOC?", click Yes
  5. Geoprocessing dialog then returns:

Error loadings output shape files C:/QuantumGIS-1.6/foo.shp

Ticket request:

  1. Short-term. A more user-friendly error message explaining that there is a problem with duplicate column names
  2. Buffer tool to handle shapefiles with duplicate column names?

Submitted by: sam@… (irc: samrae)

Attachments (1)

sample_data.tar.gz (196.9 KB ) - added by samrae29 13 years ago.
Error replicated using this dataset. Duplicate column name 'SOURCE_PRO'

Download all attachments as: .zip

Change History (5)

by samrae29, 13 years ago

Attachment: sample_data.tar.gz added

Error replicated using this dataset. Duplicate column name 'SOURCE_PRO'

comment:1 by lutra, 13 years ago

are two columns with the same name allowed?

in reply to:  1 comment:2 by timlinux, 13 years ago

Replying to lutra:

are two columns with the same name allowed?

According to the spec as far as I know you may not have duplicate column names, but users don't always follow the spec and the buffer tool should at least give the user some feedback as to why creation of the buffer failed.

Tim

comment:3 by borysiasty, 13 years ago

Component: VectorsfTools

comment:4 by cfarmer, 13 years ago

Resolution: fixed
Status: newclosed

This ticket is actually a duplicate of #3148, which has been closed as of r15385. QgsVectorFileWriter should now handle duplicate names more gracefully, and where it does not, fTools now issues an error message.

As always, please update and test to confirm this issues has been resolved. If not, please reopen the ticket.

Regards,

Carson

Note: See TracTickets for help on using tickets.