I have a polygon vector layer with already 529 objects but without any attributes so far and now I get the message that shapefiles without attributes are treated as write protected. What can I do to go on working with my shapefile?
2 Answers
Ok, I just found the solution that I can save the file to a new shapefile that I can edit:)
As a work-around try adding a temporary, meaningless attribute using a spreadsheet.
Open the DBF file, which is part of the shapefile, in OpenOffice Calc or an older version of Excel (see this link regarding DBFs in Excel). Add a name to the first empty column, making sure the name is short and doesn't include spaces or special characters. Enter the same meaningless value, 1 or A for example, in that new column for every row that already has data. Save the file and exit the spreadsheet.
QGIS should now see an attribute in the shapefile and allow further edits. The temporary attribute can be deleted after you've entered actual attributes using QGIS.
-
Make sure you don't delete existing data, sort, or otherwise change the order of any rows or columns in the spreadsheet. This will cause problems with the shapefile.– user3461Commented Sep 16, 2012 at 12:19