<div dir="ltr">No its old:<div><br></div><div>POSTGIS="3.3.2 3.3.2" [EXTENSION] PGSQL="140" GEOS="3.11.1-CAPI-1.17.1" PROJ="7.2.1" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 5:03 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Is built fresh off master?<br><div><br><blockquote type="cite"><div>On Jan 25, 2024, at 3:45 PM, Bruce Rindahl <<a href="mailto:bruce.rindahl@gmail.com" target="_blank">bruce.rindahl@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div>" I don't think that word means what you think it means"</div><div><br></div><div>Say A is a point at 0.1,1</div><div>B is a line from 0,0 to 0,2 </div><div><br></div><div>Then using the following code:</div><div>--------------------------------------------------------------</div><div>with a as (select st_makepoint(0.1,1) as geom),<br>b as (select st_makeline(st_makepoint(0,0),st_makepoint(0,2)) as geom)</div><div><br>select 'ST_Covers(ST_Buffer(A,Dist),B)',  ST_Covers(ST_Buffer(a.geom, 0.2), b.geom) from a,b<br>union all<br>select  'ST_DFullyWithin(A,B,Dist)',  ST_DFullyWithin(a.geom,b.geom,0.2) from a,b<br>union all<br>select 'ST_Covers(ST_Buffer(B,Dist),A)',  ST_Covers(ST_Buffer(b.geom, 0.2), b.geom) from a,b<br>union all<br>select  'ST_DFullyWithin(B,A,Dist)',  ST_DFullyWithin(b.geom,a.geom,0.2) from a,b<br></div><div>-------------------------------------------------------------</div><div><br></div><div><br></div><div>Yields:</div><div>QUERY                                                RESULT<br>"ST_Covers(ST_Buffer(A,Dist),B)"      false<br>"ST_DFullyWithin(A,B,Dist)"                false<br>"ST_Covers(ST_Buffer(B,Dist),A)"      true<br>"ST_DFullyWithin(B,A,Dist)"                false<br></div><div><br></div><div>I think the last row should also be true.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 1:14 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On Jan 25, 2024, at 11:57 AM, Martin Davis <<a href="mailto:mtnclimb@gmail.com" target="_blank">mtnclimb@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div>Another reason for keeping the meaning "ST_DFullyWithin(A, B) = ST_Covers(ST_Buffer(A, Dist), B)":</div><div><br></div><div>I see the main use of this function in queries to be "find all the B features which are fully within distance D of an A feature".  So the A feature is the *constant* "query item", and it is evaluated against a set of B features.  It seems more intuitive for the constant feature to be the first argument in functions.</div></div></div></blockquote><div><br></div><div>Concur, this is also my intuition, which is why it’s coded the way it is…</div><div><br></div><div>P</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>PS note the definition needs to use Covers rather than Contains, due to that ol' quirky definition of Contains! </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 25, 2024 at 10:57 AM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca" target="_blank">pramsey@cleverelephant.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On Jan 25, 2024, at 10:19 AM, Bruce Rindahl <<a href="mailto:bruce.rindahl@gmail.com" target="_blank">bruce.rindahl@gmail.com</a>> wrote:</div><br><div><div dir="ltr">I agree with Regina.  Also why are we coding this as a function in C when it can be done either of two ways in SQL:</div></div></blockquote><div><br></div><div>In general functions in SQL are less fun to upgrade. Will eventually do this via Hausdorf.</div><div><br></div><div>I don’t know that I agree about the parameter ordering, and I do not think the name of the function provides any guidance when I re-write it in object form, </div><div><br></div><div>A.DFullyWithin(B,R)</div><div><br></div><div>at least not in the same way that</div><div><br></div><div>A.contains(B) </div><div><br></div><div>makes parameter meaning clear.</div><div><br></div><div>It’s the “D” that wrecks it.</div></div></div></blockquote></div></div>
</div></blockquote></div><br></div></blockquote></div>
</div></blockquote></div><br></div></blockquote></div>