QGIS Layers – How to Fix Greyed Out Edit Button

editinglayersqgis

I created a QGIS map, which I was able to edit (right click on layer and select toggle edit, or use button in tool bar). Having returned to work on the plan, most layers now have this button greyed out. How can I work through to find what has caused this?

The affected layers are shapefiles – points and lines, based on KML files imported from Google Earth. I can still edit shapefiles created directly from within QGIS.

After importing I could edit then (e.g move points), and have subsequently added further layers (rasters and shape files) and grouped layers.

I do not know at what point I stopped being able to edit. I have tried editing them within and outwith groups.

The only solution is to save as, new file name, then add the new layer – but I loose properties such as line width. This is fine for now, but to prevent it happening again, I wonder what went wrong or a better way to fix?

I have used latest GIS (2.0.1-Dufour) from start of the project. Files are stored locally.

Best Answer

Layers based on KML files are most likely to cause such problems. KML does not offer all possibilities we use in QGIS, and has other features we can not handle in QGIS. In such cases, editing of the layer will be abandonned by greying the button out.

Best practice is always to load a KML, save as shapefile (or spatialite database), delete the KML layer and work on with the shapefile(s).

For the styling, you can save the styling for every layer you created as .qml file, and reload it in another project.

Related Question