I am having a problem in QGIS with some layers failing to display on the map canvas. I am trying to learn about QGIS by working through the Training Manual found on docs.qgis.org. I am running version 3.16.1 under Linux Mint 19.3. I installed the Flatpak version of QGIS using the Linux Mint software manager. Several months ago I downloaded the training data that goes with the manual and worked on some of the exercises, and it all seemed to work well. But recently when I looked at the project the layer that was imported from a SpatiaLite database, called landuse, no longer displays on the canvas even though the layer is check-marked in the layers list. When I look at the attribute table for this layer and select Zoom to Feature on a record it zooms in but does not display the feature. When I select Flash Feature it does flash. Another layer, called roads, which is from a Geopackage database, also will no longer display on the canvas. Other layers which were imported as shapefiles are displayed. I tried downloading the training data again and connected the SpatiaLite and Geopackage files under new names. I imported the layers into a new project but the landuse layer (SpatiaLite) still does not display. The roads layer (Geopackage) does display but if I zoom in it disappears and will re-appear if I go to full zoom. Does anyone have any ideas to fix this?
It can be hard to debug these sorts of issues for an experienced user, even more so to someone new to GIS.
You have already tried re-importing the data as a new layer. That is a good thing to have checked first.
Other things I would try:
verify the layer CRS is correct
verify the layer is not covered on top by another layer blocking it (as a quick test, try unchecking all other layers)
verify you don't have scale-based rendering on for the layer, with rendering turned off at the scales you are using
in the layer symbology, temporarily add (with the + icon at right) an extremely plain vanilla additional symbol layer of whatever garish colour symbol/line/polygon fill strikes your fancy. The purpose is to make sure your current symbology (which by the way could be being imported as a default style from the database storing the data, if you munged something up) doesn't have some crazy conditionals or data-driven settings that you're not noticing but are hiding it in your instance. (I once spent a frustrating hour debugging a disappearing layer, where it turned out I had turned on data-driven colouring with an expression based on another field I had unwittingly renamed.)
I have this same exact issue. I just downloaded QGIS and training data today, same system configurations (linux, flatpack, etc).
Update I just got the spatialite data to render. It seemed QGIS wasn't mapping the geometry field correctly. I have not figured out how to correct the GeoPackage data.
- Right click on layer
- Select Update SQL
- On the bottom right, map the geometry field
Second update: I re-extracted the data, and then the GeoPackage data rendered correctly. I have no idea why this would change the rendering result, but yet it did.