3

I'm trying to create a custom subset block map of the 2010 Census shapefile for Massachusetts. I've joined population data from other DBF files and am trying to save the shapefile vector layer as a new file with the added data.

When I join the files, the Attributes Table lists the data correctly with the same Column field names intact (within QGIS). When I do a "Save As..." and try to save it out as a new ESRI file, the column field names in the DBF file get renamed to "CEN2010_1" and so on. The data is fine; it's just the column names.

I didn't see many option in the Save As dialog box other than "Encoding" that might affect it. Is there something else I should be doing to keep the column field names from getting renamed?

2 Answers 2

4

This is a prefix which is added, by default, to joined fields. It is used to differentiate which fields belongs to which layers.

From QGIS 2.8 onwards, you can specify this prefix to whatever name you want or you can leave it blank so that only the original field names are shown:

QGIS 2.8 prefix

When you save this, you should not see field names beginning with CEN2010_1.

Hope this helps!

1
  • Most welcome buddy! Glad you got it working :)
    – Joseph
    Commented Nov 10, 2015 at 16:22
2

That did the trick! In my case, the prefix was actually replacing the field name (rather than tacking it onto the beginning).

So, checking the box to include a custom field name prefix and then leaving it blank ensured that the field names remained intact.

Thanks!

1
  • You're right in that when you use Save As..., the prefix 'replaces' the field name. In actual fact, field names are restricted to only 10 characters. If you look at the joined attribute table, the field names begin with the prefix and then the original name. But when you export this, it will only export the first 10 characters of the field. So having a prefix can be useful, but can also be annoying :)
    – Joseph
    Commented Nov 10, 2015 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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