Hi Pedro,<div>I'm using the composer + Atlas plugin to automate the creation of map series. These weeks the Atlas is undergoing a refactoring and the porting to C++, with more features then the current Python version. It sould come out during next one/two months.</div>
<div><br></div><div>giovanni</div><div><br><br><div class="gmail_quote">2012/9/18 Tim Sutton <span dir="ltr"><<a href="mailto:lists@linfiniti.com" target="_blank">lists@linfiniti.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<div class="im"><br>
On Tue, Sep 18, 2012 at 1:07 AM, Pedro Camargo <<a href="mailto:veigacamargo@gmail.com">veigacamargo@gmail.com</a>> wrote:<br>
> Hi,<br>
>      I have been using QGIS for a few months now after almost a decade using<br>
> Maptitude and TransCAD (from Caliper Corporation).<br>
><br>
>      Now that I already know how to get around pretty well with QGIS, I want<br>
> to use it to production of series of maps (from a few dozens to hundreds at<br>
> a time).<br>
><br>
>      My current problem is to make simple maps with graduated style and<br>
> fixed classes for several different fields on the database.<br>
><br>
>    Looking at the PyQGIS documentation helped a bit, but I got several<br>
> errors like "NameError: name 'QtGui' is not defined" and for many other<br>
> names/libraries in the sample code I used, so I'm pretty sure that I have<br>
> something missing that was not mentioned in the documentation or that I<br>
> missed.<br>
><br>
>    Further, I'm interested in making maps with fields that are not in the<br>
> database, so I need to make a join too (which is not mentioned anywhere in<br>
> the documentation I saw).<br>
><br>
>     I would imagine that there is a way to open a project, change something<br>
> (like the fields for the graduate rendenring), update the map composer and<br>
> save the jpg, but I didn;t see anything like that...<br>
><br>
>     Did anybody face a situation like this? Any recomendations?  Any sample<br>
> code you could share?<br>
><br>
<br>
</div>Here is a nice code sample of creating a complex map using QGIS 1.8 api.<br>
<br>
<a href="https://github.com/AIFDR/inasafe/blob/master/safe_qgis/map.py" target="_blank">https://github.com/AIFDR/inasafe/blob/master/safe_qgis/map.py</a><br>
<br>
Also look at the source of the Atlas plugin. Note that in master<br>
things get considerably easier for creating a map in python since you<br>
can use a lot more templating etc. There are some unit tests which<br>
should provide a nice reference guide:<br>
<br>
<a href="https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgscomposermap.py" target="_blank">https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgscomposermap.py</a><br>
<a href="https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgscomposerhtml.py" target="_blank">https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgscomposerhtml.py</a><br>
<br>
It is better to write coding related questions to the dev list in my<br>
opinion. It would alse be good if you mentioned what OS and QGIS<br>
versions you are using when you write such emails so that we can give<br>
you platform specific advice. It looks very much like the Qt4 python<br>
modules are not in your path or are not installed.<br>
<br>
Regards<br>
<br>
Tim<br>
<div class="im"><br>
<br>
<br>
> Thanks for the help,<br>
><br>
> Pedro<br>
> UC Irvine<br>
><br>
><br>
><br>
><br>
> PS - Sorry for posting in two lists, but I really have no idea where to send<br>
> this e-mail.<br>
><br>
</div>> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
><br>
<br>
<br>
<br>
--<br>
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>
==============================================<br>
Please do not email me off-list with technical<br>
support questions. Using the lists will gain<br>
more exposure for your issues and the knowledge<br>
surrounding your issue will be shared with all.<br>
<br>
Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>
 * QGIS programming and support services<br>
 * Mapserver and PostGIS based hosting plans<br>
 * FOSS Consulting Services<br>
Skype: timlinux<br>
Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>
==============================================<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div>