<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Perhaps this isn’t a helpful answer, but I try to keep as much analytical work as possible out of my desktop GIS of choice (sometimes QGIS, sometimes ArcMap) and into a spatial database such as PostGIS. A spatial join like you’ve described is pretty trivial as a SQL query and allows for easy tweaking or building off of the results.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>It may not be practical for the single, simple use case that you’ve identified, but if you’re looking to make this a learning experience I would recommend that approach.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Spencer<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> qgis-user-bounces@lists.osgeo.org [mailto:qgis-user-bounces@lists.osgeo.org] <b>On Behalf Of </b>Jonathan Moules<br><b>Sent:</b> Thursday, August 08, 2013 7:38 AM<br><b>To:</b> Randal Hale<br><b>Cc:</b> qgis-user@lists.osgeo.org<br><b>Subject:</b> Re: [Qgis-user] Spatial Join<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>It's not temporally critical. I have ArcGIS and can (have) done it there; this is more a learning exercise as to what QGIS can do and how to do analysis with it. Spatially joining data like this is something I seem to do quite often so I was surprised not to find a universal tool.<o:p></o:p></p></div><div><p class=MsoNormal>Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Jonathan<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On 8 August 2013 13:34, Randal Hale <<a href="mailto:rjhale@northrivergeographic.com" target="_blank">rjhale@northrivergeographic.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal>Let me get to a good stopping point this morning and I'll test something out. I think I might be able to say yes to the tool. I think. <o:p></o:p></p><div><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>-----------------<o:p></o:p></pre><pre>Randal Hale, GISP<o:p></o:p></pre><pre>North River Geographic Systems, Inc<o:p></o:p></pre><pre><a href="http://www.northrivergeographic.com" target="_blank">http://www.northrivergeographic.com</a><o:p></o:p></pre><pre><a href="tel:423.653.3611" target="_blank">423.653.3611</a> <a href="mailto:rjhale@northrivergeographic.com" target="_blank">rjhale@northrivergeographic.com</a><o:p></o:p></pre><pre><a href="mailto:rjhale@northrivergeographic.com" target="_blank"><mailto:rjhale@northrivergeographic.com></a><o:p></o:p></pre><pre>twitter:rjhale<o:p></o:p></pre><pre><a href="http://about.me/rjhale" target="_blank">http://about.me/rjhale</a><o:p></o:p></pre></div><div><div><p class=MsoNormal>On 08/08/2013 08:20 AM, Jonathan Moules wrote:<o:p></o:p></p></div></div></div><div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi Randal, <o:p></o:p></p><div><p class=MsoNormal>I had noticed the polygons to points converter, but wanted to do it "properly" - i.e. with a polygons in polygons comparison.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Your method will likely work but adds two extra steps (conversion to points and then from points back to polygons). Does QGIS not have a tool for this then?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Jonathan<br><br><o:p></o:p></p><div><p class=MsoNormal>On 8 August 2013 13:12, Randal Hale <<a href="mailto:rjhale@northrivergeographic.com" target="_blank">rjhale@northrivergeographic.com</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal>Here's how I would do it: You have Two polygon layers and you need to count the number of polygons in layer 1 that are contained in the polygons in layer 2 <br><br>1. Convert the polygons in 1 to points: Vector -> geometry -> polygon centroids <br>2. then use -> vector -> analysis tools -> points in polygon. Count the number of points contained by polygons in layer 2. <br><br>Hope that helps or at least creates an idea. <br>Randy<br><br><o:p></o:p></p><pre>-----------------<o:p></o:p></pre><pre>Randal Hale, GISP<o:p></o:p></pre><pre>North River Geographic Systems, Inc<o:p></o:p></pre><pre><a href="http://www.northrivergeographic.com" target="_blank">http://www.northrivergeographic.com</a><o:p></o:p></pre><pre><a href="tel:423.653.3611" target="_blank">423.653.3611</a> <a href="mailto:rjhale@northrivergeographic.com" target="_blank">rjhale@northrivergeographic.com</a><o:p></o:p></pre><pre><a href="mailto:rjhale@northrivergeographic.com" target="_blank"><mailto:rjhale@northrivergeographic.com></a><o:p></o:p></pre><pre>twitter:rjhale<o:p></o:p></pre><pre><a href="http://about.me/rjhale" target="_blank">http://about.me/rjhale</a><o:p></o:p></pre><div><div><p class=MsoNormal>On 08/08/2013 07:36 AM, Jonathan Moules wrote:<o:p></o:p></p></div></div></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal>Hi List, <o:p></o:p></p><div><p class=MsoNormal>   I have two layers of polygons. I want to do some analysis between them, basically doing a spatial join, counting how many of one polygon layer there are intersecting with each polygon in the other layer. <o:p></o:p></p></div><div><p class=MsoNormal>ArcGIS does this easily with the "Spatial Join" tool (ArcToolbox version). How can I do this in QGIS?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I know there is Vector -> Data Manage Tools -> Join attributes by location, but that only acts as a basic join and doesn't allow for counting of the number of joins.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Sextante has a large collection of tools, but none of them seem to have any help so I don't know what any of them do. (And none of them seem applicable anyway).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Suggestions welcome, Cheers,<o:p></o:p></p></div><div><p class=MsoNormal>Jonathan<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Arial","sans-serif";color:#222222'>This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.</span> <o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>Qgis-user mailing list<o:p></o:p></pre><pre><a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><o:p></o:p></pre><pre><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal><br><span style='font-family:"Arial","sans-serif";color:#222222'>This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.</span> <o:p></o:p></p></blockquote><p class=MsoNormal><o:p> </o:p></p></div></div></div></div><p class=MsoNormal><br><br><span style='font-family:"Arial","sans-serif";color:#222222;background:white'>This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.</span><o:p></o:p></p></div><HR>
<em>
<DIV><font style="FONT-FAMILY: ; FONT-SIZE: 11px"><span style="FONT-FAMILY: 'arial', 'sans-serif'; FONT-SIZE: 10pt">This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed.<span> </span>If you are NOT the intended recipient and receive this communication, please delete this message and any attachments. Thank you.</span></font></em></DIV></body></html>