<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">By the way Zoltan, if you want to visualise the points defined by layer a's lon, lat columns, you can use QGIS's nifty virtual layer function to render them as a point layer:</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Add virtual layer</div><div class="">Import -> select layer a from the list</div><div class="">Use this query: select name, lon, lat, st_point(lon, lat) as geom from a;</div><div class="">Explicitly set the geometry to Point, column name geom</div><div class=""><br class=""></div><div class="">Regards</div><div class=""><br class=""></div><div class="">Tim</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 08 Jul 2016, at 4:53 PM, Tim Sutton <<a href="mailto:tim@kartoza.com" class="">tim@kartoza.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hi</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 08 Jul 2016, at 4:07 PM, David Barkhuisen <<a href="mailto:dave@kirchhoffsurveyors.co.za" class="">dave@kirchhoffsurveyors.co.za</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div text="#000000" bgcolor="#FFFFFF" class="">Hi Tim, Zoltan<br class=""><br class="">Just a quick one with the query below.<br class=""><br class="">Will it not be easier to move both tables into postgis db.<br class="">Add empty lat and long columns to B then using SQL update the table to pull the data from A to B<br class="">something like:<br class=""><br class="">UPDATE B<br class="">SET B.long = A.long<br class="">        B.Lat = A.lat<br class=""><br class="">From A<span class="Apple-converted-space"> </span><br class="">JOIN B<span class="Apple-converted-space"> </span><br class="">ON ST_Intersects(A.geom, B.geom)<br class=""><br class="">Would that not be an easier method?<br class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Yes absolutely - my answer was more intended to be academic ("how could one do this in QGIS"). Given a choice doing it in PostGIS is going to be far more efficient...</div><div class=""><br class=""></div><div class="">Regards</div><div class=""><br class=""></div><div class="">Tim</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div text="#000000" bgcolor="#FFFFFF" class="">Regards<br class="">David<br class=""><br class=""><br class=""><div class="moz-cite-prefix">On 08/07/2016 12:37, Tim Sutton wrote:<br class=""></div><blockquote cite="mid:8487A194-876F-4DDF-8F6E-32E8EADDA044@kartoza.com" type="cite" class="">Hi<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 08 Jul 2016, at 11:30 AM, Zoltan Szecsei <<a moz-do-not-send="true" href="mailto:zoltans@geograph.co.za" class="">zoltans@geograph.co.za</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">Hi again,<br class="">OK - it's not an index thing. More than one 'a' polygon has received the 'b' attribute from the wrong 'b' polygon even though the coordinate is inside the correct 'b' polygon.<br class=""><br class="">So the next step is to suspect the index.intersects result.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Could you share a small testable dataset that replicates it? I made a noddy test dataset here when playing with it last night which worked fine, but it only had 2 polygons in it...</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">Note the coords are in LatLong  "small numeric values. I can see we are using a null-length box (ie: a point) to select from 'b'.<br class="">What is the internal precision of the QgsPoint?<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">the x and y properties of QgsPoint are both doubles...it depends on your platform what that means but typically</div><div class=""><br class=""></div><div class=""><a moz-do-not-send="true" href="http://qgis.org/api/2.6/classQgsPoint.html" class="">http://qgis.org/api/2.6/classQgsPoint.html</a></div><div class=""><br class=""></div><div class="">According to wikipedia on a 64 bit machine it should be:</div><div class=""><br class=""></div><div class=""><ul class="" style="margin: 0.3em 0px 0px 1.6em; padding: 0px; list-style-image: url(data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20width%3D%225%22%20height%3D%2213%22%3E%0A%3Ccircle%20cx%3D%222.5%22%20cy%3D%229.5%22%20r%3D%222.5%22%20fill%3D%22%2300528c%22%2F%3E%0A%3C%2Fsvg%3E%0A); color: rgb(37, 37, 37); font-family: sans-serif; font-size: 14px;"><li class="" style="margin-bottom: 0.1em;"><a moz-do-not-send="true" href="https://en.wikipedia.org/wiki/Sign_bit" title="Sign bit" class="" style="text-decoration: none; color: rgb(11, 0, 128); background-image: none;">Sign bit</a>: 1 bit</li><li class="" style="margin-bottom: 0.1em;"><a moz-do-not-send="true" href="https://en.wikipedia.org/wiki/Exponent" class="mw-redirect" title="Exponent" style="text-decoration: none; color: rgb(11, 0, 128); background-image: none;">Exponent</a> width: 11 bits</li><li class="" style="margin-bottom: 0.1em;"><a moz-do-not-send="true" href="https://en.wikipedia.org/wiki/Significand" title="Significand" class="" style="text-decoration: none; color: rgb(11, 0, 128); background-image: none;">Significand</a> <a moz-do-not-send="true" href="https://en.wikipedia.org/wiki/Precision_%28arithmetic%29" class="mw-redirect" title="Precision (arithmetic)" style="text-decoration: none; color: rgb(11, 0, 128); background-image: none;">precision</a>: 53 bits (52 explicitly stored)</li></ul><div class=""><br class=""></div><div class=""><br class=""></div></div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">My coord attributes are 'double Real 19,10'<span class="Apple-converted-space"> </span><br class=""><br class="">In a script, when you select with a point, what is the snapping tolerance?<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">To use snapping you would need to use the QGIS snapping api - otherwise absolute geometry operations are being done.</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">My project CRS is epsg 4326 - so it should be OK.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Yup. If you wanted to be fancy, you could extract a layer of the tie points (FptnLat. FptnLong) so that you can actually visualise the points in relation to the polygons. Maybe you have some that don't actually intersect a poly...</div><br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class=""><br class="">FWIW, b.name is string 60 which is copied into a.name string 32  -  but the contents are shorter that 32 chars.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I think QGIS will just truncate it if the name is longer than 32 chars.</div><div class=""><br class=""></div><div class="">T</div><br class=""><blockquote type="cite" class=""><div bgcolor="#FFFFFF" text="#000000" class=""><br class="">Any thoughts anyone?<br class=""><br class="">Regards,<br class="">Zoltan<br class=""><br class=""></div></blockquote></div><br class=""></div><br class=""><fieldset class="mimeAttachmentHeader"></fieldset><br class=""><pre wrap="" class="">_______________________________________________
Africa mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Africa@lists.osgeo.org">Africa@lists.osgeo.org</a>
You can UNSUBSCRIBE at <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/africa">http://lists.osgeo.org/mailman/listinfo/africa</a></pre></blockquote><br class=""></div>_______________________________________________<br class="">Africa mailing list<br class=""><a href="mailto:Africa@lists.osgeo.org" class="">Africa@lists.osgeo.org</a><br class="">You can UNSUBSCRIBE at <a href="http://lists.osgeo.org/mailman/listinfo/africa" class="">http://lists.osgeo.org/mailman/listinfo/africa</a></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>