2

I have a project that mainly consist of PostGIS tables, but also some shapefiles. All in all I have some 50 layers in use in the project.

The last days, I have had problems with the print composer. Two polygon layers are shown behind point and line layers even if layer ordering is enabled (the same problem in exported maps), they are ordered correctly in QGIS desktop, and shown in the right order in QGIS desktop. Also, at least one line layer does not show in the print composer and is not exported when creating an exported map.

I have tried removing and importing PostGIS layers, same thing happens again. I have also tried removing layer styles and setting them up again without any extra settings.

This is QGIS 2.18. I cannot move to QGIS 3 because of a geomnearest function that does not work with QGIS 3, otherwise that would be my next thing to try.

Are there any ways to check the coherency of the project file? Is there anything else that comes to mind that could cause this kind of trouble?

This has something to do with visibility presets. Even if I have the correct layers saved as a visibility preset, and I tell the composer map to follow that visibility preset, some layers are not shown in the composer (but shown alright in QGIS Desktop when the visibility preset is chosen there). When i deselect the use of visibility preset in the composer, the layers show OK. I have tried to delete presets and re-make them with new names, does not help.

  • This has something to do with visibilty presets. Even if I have the correct layers saved as a visibility preset, and I tell the composer map to follow that visibility preset, some layers are not shown in the composer (but shown allright in QGIS Desktop when the visibility preset is chosen there). When i deselect the use of visibility preset in the composer, the layers show OK. I have tried to delete presets and re-make them with new names, does not help. – Benjamin Donner Jul 23 at 8:23
  • Are you using the latest version of QGIS 2.18? (The latest for Windows is 2.18.28.) Does it help to use the "lock layers" option instead of a visibility preset? It's possible to define the list of locked layers using the expression builder and inputting the layer names separated by | (pipe character / vertical line / shift+backslash). – csk Jul 23 at 19:06
  • 1
    If it's a bug in 2.18 that hasn't been fixed, then it never will be. It might make more sense to upgrade to 3.4 and find a workaround for the geomnearest function. The refFunction plugin had an update released in March, so if you haven't tried it since then the issue may be fixed. Just make sure you update it in the plugin manager. – csk Jul 23 at 19:17
  • Not an answer, just an idea: I also noticed not showing layers in printcomposer and the exported pdf in some cases (using QGIS 3). I figured out it has something to do with the power of my pc: while a slow computer does not show some complex layers, a powerful one does (same project, same settings, same everything except hardware). In case you have the chance to try another computer. – MrXsquared Jul 24 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.