<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1454438917798_945359">Which version of QGIS are you using? This is in the dev version which I'm using (on Linux), but not in QGIS 2.8 (just looked at that on another laptop - Geometry tools is there - but not the centroid one). I don't know if it is in 2.12 or not.<br></div><div id="yui_3_16_0_1_1454438917798_945409"><br></div><div id="yui_3_16_0_1_1454438917798_945411">You can also install the "realcentroids" plugin. This seems to create a replica of the polygon table, but creates a point feature to replace the polygon, which should also do what you want.</div><div id="yui_3_16_0_1_1454438917798_945454"><br></div><div id="yui_3_16_0_1_1454438917798_945488">I just tried it & it worked in a simple test case. Perhaps your easiest option.<br></div><div id="yui_3_16_0_1_1454438917798_945413"><br></div><div id="yui_3_16_0_1_1454438917798_946814">There is also a processing -> qgis geoalgorithms -> polygon centroid function, but this can return a point which does not lie within the polygon if the polygon is concave.</div><div id="yui_3_16_0_1_1454438917798_949162"><br></div><div id="yui_3_16_0_1_1454438917798_949291">A bit more cumbersome - but you can also:</div><div id="yui_3_16_0_1_1454438917798_949405"><br></div><div id="yui_3_16_0_1_1454438917798_949407"> edit the polygon layer, <br></div><div id="yui_3_16_0_1_1454438917798_949479">open the attribute table<br></div><div id="yui_3_16_0_1_1454438917798_946859">start the field calculator</div><div id="yui_3_16_0_1_1454438917798_949410" dir="ltr">create a new (real no with decimals) column as the X value ie: X($geometry)<br></div><div id="yui_3_16_0_1_1454438917798_949412" dir="ltr">create a new column as the Y value ie: Y($geometry)</div><div id="yui_3_16_0_1_1454438917798_949414" dir="ltr">save as CSV file<br></div><div id="yui_3_16_0_1_1454438917798_949469" dir="ltr">open the CSV file & define it as a point layer using the new X & Y columns for coords<br></div><div id="yui_3_16_0_1_1454438917798_949471"><br></div><div id="yui_3_16_0_1_1454438917798_949473">You now have a point layer of centroids (but note that centroids can lie outside a concave polygon):-)<br></div><div id="yui_3_16_0_1_1454438917798_949618"><br></div><div id="yui_3_16_0_1_1454438917798_945415">Cheers<br></div><div id="yui_3_16_0_1_1454438917798_942019"><span></span></div>Brent<br> <div id="yui_3_16_0_1_1454438917798_942020" class="qtdSeparateBR"><br><br></div><div style="display: block;" id="yui_3_16_0_1_1454438917798_945420" class="yahoo_quoted"> <div id="yui_3_16_0_1_1454438917798_945419" style="font-family: verdana, helvetica, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1454438917798_945418" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1454438917798_945417" dir="ltr"> <font id="yui_3_16_0_1_1454438917798_945438" face="Arial" size="2"> <hr id="yui_3_16_0_1_1454438917798_945486" size="1"> <b><span style="font-weight:bold;">From:</span></b> rsweeny <rsweeny@mun.ca><br> <b><span style="font-weight: bold;">To:</span></b> Brent Wood <pcreso@yahoo.com>; "qgis-user@lists.osgeo.org" <qgis-user@lists.osgeo.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 9, 2016 7:54 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Qgis-user] adding points within polygons<br> </font> </div> <div id="yui_3_16_0_1_1454438917798_945440" class="y_msg_container"><br><div id="yiv4551325614"><div id="yui_3_16_0_1_1454438917798_945442">
Brent<br clear="none">
So kind of you to respond. I am afraid "geometry tools" is not an
option on my Vector pull down menu or toolbar. Do I need a plug-in?<br clear="none">
I quite agree with you about the centrality of a proper relational
database underpinning the gis. It is getting from one to the other
that is giving me the headaches.<br clear="none">
Robert<br clear="none">
<br clear="none">
<div class="yiv4551325614yqt2608862684" id="yiv4551325614yqt24647"><div id="yui_3_16_0_1_1454438917798_945444" class="yiv4551325614moz-cite-prefix">On 08/02/2016 7:01 PM, Brent Wood
wrote:<br clear="none">
</div>
<blockquote id="yui_3_16_0_1_1454438917798_945448" type="cite">
<div id="yui_3_16_0_1_1454438917798_945447" style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:16px;">
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905178">Hi Robert,</div>
<div id="yui_3_16_0_1_1454438917798_945452" dir="ltr"><br clear="none">
</div>
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905231">You can
create a layer of points for each polygon using:Vector -
Geometry Tools - Polygon Centroids</div>
<div id="yiv4551325614yui_3_16_0_1_1454438917798_905229"><br clear="none">
</div>
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905198">if you
have a common field in this and the census data, you can then
join the two:</div>
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905360">Layer -
Properties - Join</div>
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905362"><br clear="none">
</div>
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905364">But I
recommend the use of an underlying database tool to manage
your data, such as Postgis or Spatiallite, and join the data
there to be used in QGIS. A collection of files does not
provide the power of a database for managing data, even when
accessed by QGIS. <br clear="none">
</div>
<div class="yiv4551325614qtdSeparateBR" id="yiv4551325614yui_3_16_0_1_1454438917798_905177">
<div id="yiv4551325614yui_3_16_0_1_1454438917798_905378"><br clear="none">
</div>
<div id="yiv4551325614yui_3_16_0_1_1454438917798_905379">Well managed data
is the foundation your analysis, model or GIS sits on...<br clear="none">
</div>
<div><br clear="none">
</div>
<div>Cheers<br clear="none">
</div>
<div><br clear="none">
</div>
Brent Wood<br clear="none">
</div>
<div class="yiv4551325614yahoo_quoted" id="yiv4551325614yui_3_16_0_1_1454438917798_905454" style="display:block;">
<div id="yiv4551325614yui_3_16_0_1_1454438917798_905453" style="font-family:verdana, helvetica, sans-serif;font-size:16px;">
<div id="yiv4551325614yui_3_16_0_1_1454438917798_905452" style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;">
<div dir="ltr" id="yiv4551325614yui_3_16_0_1_1454438917798_905451"> <font face="Arial" size="2">
</font><hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
rsweeny <a rel="nofollow" shape="rect" class="yiv4551325614moz-txt-link-rfc2396E" ymailto="mailto:rsweeny@mun.ca" target="_blank" href="mailto:rsweeny@mun.ca"><rsweeny@mun.ca></a><br clear="none">
<b><span style="font-weight:bold;">To:</span></b>
<a rel="nofollow" shape="rect" class="yiv4551325614moz-txt-link-abbreviated" ymailto="mailto:qgis-user@lists.osgeo.org" target="_blank" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a> <br clear="none">
<b><span style="font-weight:bold;">Sent:</span></b>
Tuesday, February 9, 2016 2:10 AM<br clear="none">
<b><span style="font-weight:bold;">Subject:</span></b>
[Qgis-user] adding points within polygons<br clear="none">
</div>
<div class="yiv4551325614y_msg_container" id="yiv4551325614yui_3_16_0_1_1454438917798_905456"><br clear="none">
Hi<br clear="none">
People's answers to Grant's question were so clear I'm
hoping that <br clear="none">
something similar might exist to facilitate my task. I
have 32k of <br clear="none">
polygons representing every lot in the city of Montreal
in 1903. I also <br clear="none">
have the 1901 census returns coded by household (95k of
them) to those <br clear="none">
lots. Is there a simple way to have Qgis place points
within each lot <br clear="none">
polygon for the corresponding households?<br clear="none">
Thanks in advance.<br clear="none">
Robert<br clear="none">
<br clear="none">
-- <br clear="none">
Robert C.H. Sweeny<br clear="none">
Professor of History<br clear="none">
Memorial University of Newfoundland<br clear="none">
St John's NL, A1C 5S7<br clear="none">
Canada<br clear="none">
709-864-8440, 709-864-2164 (fax)<br clear="none">
<br clear="none">
_______________________________________________<br clear="none">
Qgis-user mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:Qgis-user@lists.osgeo.org" target="_blank" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br clear="none">
List info: <a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br clear="none">
Unsubscribe: <a rel="nofollow" shape="rect" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br clear="none">
<br clear="none">
</div>
</div>
</div>
</div>
</div>
</blockquote></div>
<br clear="none">
<pre class="yiv4551325614moz-signature">--
Robert C.H. Sweeny
Professor of History
Memorial University of Newfoundland
St John's NL, A1C 5S7
Canada
709-864-8440, 709-864-2164 (fax)</pre>
</div></div><br><br></div> </div> </div> </div></div></body></html>