Site menu:


Site search

QGIS Can Now Delete Columns In Shapefiles!

How many times have you opened a shapefile in QGIS, and found yourself wanting to be able to modify its schema? If you’re like me, it happens on a very regular basis! One of my major frustrations with QGIS is that I couldn’t do this without creating another copy of the shapefile. This seemed rather unnecessary, and added to my already large data management challenge! This limitation was one of the (now very few) reasons I had to bump over to Kosmo GIS in my normal workflow.

I’m happy to say that the 0.3.9 version of QGIS’ “Table Manager” Plugin by Borys Jurgiel now allows you to change a shapefile schema without having to save the output to a new file!

You can install the plugin via the Plugin Installer – look for “Table Manager.” Once it’s installed, find it under “Plugins > Table > Table Manager.” It’ll operate on the feature you have selected in the legend, and open up a simple window that looks like this:

Table Manager

Table Manager

You can then reorder columns, rename columns, insert columns, clone (copy) columns, change data types, and delete columns! To be fair, you could do all of this before. The difference is that now you can just hit “Save” down at the bottom, and carry on! Before, you would have to “Save As,” browse to a folder, and create a whole new file. Then add this new file to your map, theme it appropriately, and remove the old layer. Annoying. Now, it’s a super simple one-step process!

A nice touch is that the old .dbf file is archived in case of a mishap. The archive is stored alongside the rest of the shapefile, but has the extension .dbf~

Thanks Borys!

Now, if only this was built in to the “Properties > Fields” tab! ;)


Comment from Giovanni Manghi
Time January 13, 2012 at 2:11 pm

Hi Darren. It was never QGIS fault, it was GDAL/OGR that until release 1.9 didn’t allowed to delete or reorder dbf columns. Now GDAL/OGR 1.9 is out, so *any* GIS application that uses it will naturally support deleting and reordering dbf columns.

Comment from darrencope
Time January 13, 2012 at 3:31 pm

Hi Giovanni;
I never meant to imply fault! This is good to know though! Hopefully that means the built-in tools will soon support the same functionality!

Comment from Martin Dobias
Time January 14, 2012 at 6:52 am

I will just add that you need QGIS >= 1.8 together with GDAL/OGR 1.9 for “native” deletion of columns – without having to use Table Manager plugin.

Comment from Renee
Time February 23, 2012 at 5:43 pm

do you know when qgis 1.8 is being officially released??

Comment from darrencope
Time February 23, 2012 at 7:16 pm

Hi Renee,

I’m not positive. However, you can always grab a ‘development’ release — the OSGeo4W package is up to now!

Pingback from DARREN COPE » 2012 – The Year in Review
Time February 3, 2013 at 11:35 am

[…] QGIS Can Now Delete Columns In Shapefiles! […]

Write a comment