[Qgis-user] Maps generation with Python (or Atlas ?)

Bernd Vogelgesang bernd.vogelgesang at gmx.de
Wed May 20 06:55:13 PDT 2015


Hi Benoît,

would you mind sharing your hole script as reference for others?
I think you touched a common problem which isn't covered with built-in  
functions yet, and not everyone is gifted with profound coding abilities  
in python (like me ;) )

Cheers
Bernd


Am 20.05.2015, 15:16 Uhr, schrieb Benoît Laurent <blaurent at heurisis.eu>:

> I eventually managed to solve my problem. In case somebody encounters  
> the same or a similar one, I provide my solution: I used a >Python  
> script iterating over the groups. Apparently, it is not possible (or I  
> failed) to refresh the mapCanvas during the Python >script.
> Instead of using  "legend.setLayerVisible(layer, True)", I played with  
> symbols:
>
> layers[2*g].rendererV2().symbol().setWidth(2)
> layers[2*g].rendererV2().symbol().setAlpha(1)
>
> There were others problems in my code but the main difficulty lied  
> there. Symbols can be updated during Python scripts and it >perfectly  
> meets my needs.
>
> Regards,
>
> Benoît
>
>> 	
>> L'absence de virus dans ce courrier électronique a été vérifiée par le  
>> logiciel antivirus Avast.
> www.avast.com

>



-- 
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150520/825f9faa/attachment.html>


More information about the Qgis-user mailing list