[Qgis-developer] PyQGIS and checking WMS layers have data

Stott James fmrojst at fylkesmannen.no
Wed Oct 9 06:06:05 PDT 2013


Hi all,

I have a loop in my code that makes PDFs for a number of polygons and the base mapping comes from an aerial photography WMS. So for each polygon, the python code moves the map to the extent of that polygon and the makes a PDF.

However, some of my maps end up with white backgrounds where the aerial photography hasn't loaded/displayed.

Is it possible to make sure that a WMS has loaded its data before a PDF is made in python? Or does the problem lie with the network connection at the time that PDF is made? Is there any way I can catch these instances and maybe load the WMS again?

The last time I ran the script, of the 1465 PDFs it created, about 21 had a white base map, so generally it works really really well. I have checked that there is actually data for these 21 areas, and there is. It also seems to be different areas that do not load each time I run the script.

Many thanks

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131009/78d03a17/attachment.html>


More information about the Qgis-developer mailing list