<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:'Lucida Console', Monaco, monospace;">
<p>Hello all</p>
<p><br>
</p>
<p>Maybe some of you have QGIS 2.16. </p>
<p>When using Vector | Research tools | Select by location</p>
<p>The interface is not very informative about what is the purpose of the 'Precision' parameter.</p>
<p><br>
</p>
<p>Well, somebody at <a href="http://gis.stackexchange.com/questions/210948/how-does-the-precision-parameter-in-select-by-location-tool-work?noredirect=1#comment321716_210948" class="OWAAutoLink" id="LPlnk71412">
http://gis.stackexchange.com/questions/210948/how-does-the-precision-parameter-in-select-by-location-tool-work?noredirect=1#comment321716_210948</a></p>
<p>pointed out a link on github.... qgis development.</p>
<p><br>
</p>
<p>Precision:</p>
<p><a href="https://github.com/qgis/QGIS/pull/2341" class="OWAAutoLink" id="LPlnk272751">https://github.com/qgis/QGIS/pull/2341</a></p>
<p><span style="color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px;"><b>Improve robustness of
 geometry predicates</b> with new </span><span style="color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px; box-sizing: border-box; font-weight: 600;">precision</span><span style="color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px;"> parameter
 in </span><span style="color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px; box-sizing: border-box; font-weight: 600;">by
 location</span><span style="color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px;"> algorithms.</span></p>
<p style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px;">
Snap geometries to a virtual grid of step <em style="box-sizing: border-box;">precision</em> before applying geometry predicate.<br style="box-sizing: border-box;">
This also affect bbox used for index intersection.</p>
<p style="box-sizing: border-box; color: rgb(51, 51, 51); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 14px; line-height: 21px;">
These features were funded by: MEDDE (French Ministry of Sustainable Development)</p>
<p>Just a little theoretical explanation of this would be very helpful... ...how the virtual grid and the bounding box work for the algorithm.  </p>
<p>I tested it with very small numbers but I don't know if this is affected by the extent of the layer...</p>
<p><br>
</p>
I'm wondering if this would be a kind of 'clustering tolerance' or fuzzy tolerance, like that on ArcGIS products. 
<p></p>
<p><br>
</p>
<p>This 'tolerance' issue is important but, can it be applied into QGIS, and at the same time, complying to Simple Features Standard?</p>
<p><br>
</p>
<p>I made some tests with dummy geodata in a spatialite db and Java Topology Suite (JTS).  </p>
<p>In QGIS, select by location (intersection) does not select a point that lies on the boundary of a polygon or at the interior of a line segment. (using the SFA definitions of boundary and interior....</p>
<p><br>
</p>
<p>Turns out...</p>
<p>if I want that bordering coincident point to be selected, then a vertex must lie in the same place of that point (i tested it using ST_Snap in DB Manager's SQL Window...).  </p>
<p><br>
</p>
<p>This is true for all programs using SF but not for JTS.  JTS seems more 'robust' applying predicate rules.  I don't know why in JTS a point in a boundary or line interior is selected using intersection but not in other products... it is not the same algorithm?
 JTS java and GEOS</p>
<p><br>
</p>
<p>I guess is not that simple (infinite points in a line segment) but the rule for intersects predicate states that an intersection is true if geometries share at least a point, being on their interiors or boundaries....</p>
<p><br>
</p>
<p>...</p>
<p>By the way... having a 'buffer' parameter on select by location would be very useful...</p>
<p>is somebody willing to fund it? crowd-sourcing? </p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Tw Cen MT">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma">
<div style="font-size:13px; font-family:Tahoma">
<hr>
<font style="font-family:'Lucida Console',Monaco,monospace">Iván Santiago<br style="">
GIS Specialist<br style="">
Information Technologies<br style="">
PR Office of Management and Budget<br style="">
</font><font style="font-family:'Lucida Console',Monaco,monospace">787.725.9420 x 2409<br style="">
</font><font style="font-family:'Lucida Console',Monaco,monospace"><a tabindex="0" href="http://gis.pr.gov/" target="_blank" id="LPNoLP">http://gis.pr.gov/</a></font><font face="Courier New"><a tabindex="0" href="http://gis.pr.gov/" target="" id="LPNoLP"></a>
</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>