2

I am trying to combine about 20 shapefile vector layers in to one shapefile using MMQgis - but I keep getting the error below.

Failure creating output shapefile: creation of field Bergen_FAC failed (OGR error: Can't create field Bergen_FAC in Shape DBF file, reason unknown.)

Do you know what's causing this and how it can be solved?

3

There's a few possible causes, but it's difficult to tell without seeing the original data:-

  • your field types are inconsistent (string in some shapefiles, numeric in others).
  • you have more than 255 columns/attributes
  • perhaps the field type is unsupported. What type should BERGEN_FAC be? (Look in properties > fields)
  • you have EMPTY geometries (plugins sometimes don't handle null geometries)
  • the combined (file) size of the existing 20 DBF files is too big for one shapefile DBF (>2 Gb)

The plugin won't let you mix different geometry types, so it's unlikely to be that.

To narrow this down, I'd recommend trying to merge a few shapefiles at a time, and increase the number until it fails. For example

  • merge 1 & 2 into a new file
  • merge 1 & 2 & 3 into a new file
  • merge 1 & 2 & 3 & 4 ... and so on

It's tedious to do, but it should show which file is failing to merge.

You might also want to edit your question to include any relevant python exception (you'll see this in the Python or Plugin log windows).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.