<p dir="ltr">In the layer, where is the species recorded? In Columns?</p>
<p dir="ltr">If so, I have a workflow for that.</p>
<br><div class="gmail_quote"><div dir="ltr">A sáb, 4/02/2017, 08:38, Blumentrath, Stefan <<a href="mailto:Stefan.Blumentrath@nina.no">Stefan.Blumentrath@nina.no</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="NO-BOK" link="blue" vlink="purple" class="gmail_msg">
<div class="m_-1000366202726253513WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">Thanks Andreas for the excellent procedure description.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">Good to know that Python is not required for that, and that there is a nice, flexible, and efficient solution!<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">For someone who uses QGIS on a regularly basis, this is actually much less work than it might seem at a first look.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">However, I am afraid, if I imagine that I try to explain that to my colleagues, many would not be able or not willing
to follow, I am afraid…<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">I found some more code snippets online, which I compiled into a small script. That could be easily wrapped into a plugin
if none exists for that yet…??<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">Cheers<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d" class="gmail_msg">Stefan<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<div class="gmail_msg">
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm" class="gmail_msg">
<p class="MsoNormal gmail_msg"><b class="gmail_msg"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif" class="gmail_msg">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif" class="gmail_msg"> Neumann, Andreas [mailto:<a href="mailto:a.neumann@carto.net" class="gmail_msg" target="_blank">a.neumann@carto.net</a>]
<br class="gmail_msg">
<b class="gmail_msg">Sent:</b> torsdag 2. februar 2017 15.05<br class="gmail_msg">
<b class="gmail_msg">To:</b> Blumentrath, Stefan <<a href="mailto:Stefan.Blumentrath@nina.no" class="gmail_msg" target="_blank">Stefan.Blumentrath@nina.no</a>><br class="gmail_msg">
<b class="gmail_msg">Cc:</b> <a href="mailto:Qgis-user@lists.osgeo.org" class="gmail_msg" target="_blank">Qgis-user@lists.osgeo.org</a>; Terje Blindheim <<a href="mailto:terje@biofokus.no" class="gmail_msg" target="_blank">terje@biofokus.no</a>><br class="gmail_msg">
<b class="gmail_msg">Subject:</b> Re: [Qgis-user] Print one map for every category in layer with fixed extent<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</div></div></div><div lang="NO-BOK" link="blue" vlink="purple" class="gmail_msg"><div class="m_-1000366202726253513WordSection1 gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-US" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Hi Stefan,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">It is possible without the help of Python.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">You would have to split up the species into layers.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Then create an atlas layer that is the geometry you want joined with every possible layer. You can use QGIS virtual layers for that which you can define in DB manager. Or use a
Postgis view for it.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">So for each geographic unit you want to print you need a combination with each layer you want.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">E.g.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 1 - Species 1<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 1 - Species 2<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 1 - Species 3<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 2 - Species 1<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 2 - Species 2<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Province 2 - Species 3<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">In this layer, the geometry is redundant, but since you can use Postgis views or virtual layers, it is only virtually redundant.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">-------------<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Finally, in print composer you would use data-defined layers or visibility presets based on attributes in the atlas coverage layers.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">I did exactly that - print an Atlas for several districts in my city and a loop of historic maps. For each district I printed around 15 different historic time snapshots (old maps).<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Hope this helps to get started.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Andreas<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">On 2017-02-02 11:21, Blumentrath, Stefan wrote:<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<blockquote style="border:none;border-left:solid #1010ff 1.5pt;padding:0cm 0cm 0cm 5.0pt;margin-left:0cm;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt" class="gmail_msg">
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Dear all,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">In a project I like to produce a sort of species distribution atlas, where I like to print out (export
to image) a map from the print composer for every species recorded within one and the same municipality.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">So, the map extent should not change and layout is fixed too. With these things fixed, I want to get
a map for each single species mapped and thus also legend entries change. The species are in one single layer, but I could also split them if that makes it easier.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Is there a function in Atlas for that which I overlooked or a plugin or the like.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">If not, is there any Python code I could repurpose for that? Found only this [1] and [2], where [1]
does not work…<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">But before I start looking into a pygqis solution I like to make sure that this feature does not exist
yet…<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">This is a not uncommon use case in ecology btw., so a built in function would be neat.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">I am grateful for any hint.<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Kind regards,<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">Stefan<u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">[1]
</span><a href="http://gis.stackexchange.com/questions/183589/using-pyqgis-to-create-images-from-the-qgis-print-composer-each-showing-a-differ" class="gmail_msg" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">http://gis.stackexchange.com/questions/183589/using-pyqgis-to-create-images-from-the-qgis-print-composer-each-showing-a-differ</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"><u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">[2]
</span><a href="http://kartoza.com/en/blog/how-to-create-a-qgis-pdf-report-with-a-few-lines-of-python/" class="gmail_msg" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg">http://kartoza.com/en/blog/how-to-create-a-qgis-pdf-report-with-a-few-lines-of-python/</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"><u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"><u class="gmail_msg"></u> <u class="gmail_msg"></u></span></p>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg">_______________________________________________<br class="gmail_msg">
Qgis-user mailing list<br class="gmail_msg">
</span><a href="mailto:Qgis-user@lists.osgeo.org" class="gmail_msg" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg">Qgis-user@lists.osgeo.org</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg"><br class="gmail_msg">
List info: </span><a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" class="gmail_msg" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg">https://lists.osgeo.org/mailman/listinfo/qgis-user</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg"><br class="gmail_msg">
Unsubscribe: </span><a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" class="gmail_msg" target="_blank"><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg">https://lists.osgeo.org/mailman/listinfo/qgis-user</span></a><span lang="EN-US" style="font-size:10.0pt;font-family:"Courier New"" class="gmail_msg"><u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</blockquote>
<p class="gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
<div class="gmail_msg">
<p class="MsoNormal gmail_msg"><span lang="EN-US" style="font-size:10.0pt;font-family:"Verdana",sans-serif" class="gmail_msg"> <u class="gmail_msg"></u><u class="gmail_msg"></u></span></p>
</div>
</div></div>
_______________________________________________<br class="gmail_msg">
Qgis-user mailing list<br class="gmail_msg">
<a href="mailto:Qgis-user@lists.osgeo.org" class="gmail_msg" target="_blank">Qgis-user@lists.osgeo.org</a><br class="gmail_msg">
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br class="gmail_msg">
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div>Alexandre Neto</div><div>---------------------</div><div>@AlexNetoGeo</div><div><a href="http://sigsemgrilhetas.wordpress.com">http://sigsemgrilhetas.wordpress.com</a></div><a href="http://gisunchained.wordpress.com">http://gisunchained.wordpress.com</a><br></div></div>