3

I am using QGIS 2.12.0 to make a geologic map of NY and overlay things on it. Helpfully the USGS provides a kml file to do this easily.

I found out that I could only edit the kml file outside QGIS (somewhat obnoxious) but if I save the kml file as a shapefile (using QGIS), then I can edit the attribute table within QGIS. I had done quite a lot of formatting the style page with my kml file and found that I could easily transfer the styles to the new shapefile with a simple copy and paste style command.

However when I edit the attribute table of the new shapefile the formatting disappears on the map for each entry I edit, despite still showing up in the style page of the shapefile.

Anyone seen this or know how to avoid it?

5
  • sounds like t could be a QGIS bug. Have you tried finishing your edits and then applying the style?
    – GeoMonkey
    Commented Apr 5, 2017 at 0:54
  • I think that would work. I can modify the kml using a regular editor and then the first application of the styles works OK. It just seemed strange to me that editing the attribute table would cause things to disappear. It seemed like a bug but I don't have enough experience to know that.
    – Some guy
    Commented Apr 5, 2017 at 3:29
  • There are often some strange bugs hidden away in QGIS that only come to the surface when someone like yourself tries something specific. It's a lot less widely used than we would all like, particularly on some platforms (Mac OS) so I would suggest that you report the bug to the developers.
    – GeoMonkey
    Commented Apr 5, 2017 at 15:53
  • Please clarify what kind of changes to the attribute table you are performing.
    – underdark
    Commented Apr 5, 2017 at 17:41
  • The attribute table has entries for water as h2o. I do not want these labels to show up when labeling fields so I tried editing them. Now I have realized that any edit to the label in the attribute table makes the field not fit the original style table anymore. So this may be why the field becomes blank on the map, it makes it a new line with a new label and the style field gets reset to blank. My suggestion is to retain the style of the original line by default if this is possible.
    – Some guy
    Commented Apr 6, 2017 at 3:36

1 Answer 1

2

I have come across something similar to this issue before. I am pretty sure it is just something buggy with QGIS, but I was able to find a way around it. In my case, I simply saved the vector layer as a shapefile again, (either overwrite, or save as new shapefile) and when I went to edit the attribute table again everything was working with no formatting issues.

3
  • I tried that but the styles are not saved in the new shapefile, at least the way I did it.
    – Some guy
    Commented Apr 5, 2017 at 13:18
  • I have tried various combinations of loading style files and reloading the edited shapefile and I always get the problem. I see from related threads that there seems to be a long-standing issue with editing shapefiles within QGIS. I think my solution will be to edit the kml first and then apply the styles I have within QGIS. Was hoping to avoid that.
    – Some guy
    Commented Apr 5, 2017 at 13:55
  • Yeah I have noticed that the editing of shapefiles on QGIS falls short on functionality compared to ArcGIS, but that's why having a subscription to ESRI is so expensive. Hopefully a developer will come along and fix the bugginess. Sounds like you have a solution though, editing straight from the kml shouldn't cause any styling issues like before. Commented Apr 5, 2017 at 21:23

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.