Changes between Initial Version and Version 1 of Ticket #5828, comment 1


Ignore:
Timestamp:
01/05/25 22:19:43 (2 months ago)
Author:
nbvfgh

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5828, comment 1

    initial v1  
    1 It may not be necessary to actually calculate the buffer for extending the distance of geometry A to determine whether geometry B is fully included in the buffer for extending the distance of geometry A. Because in reality, the point on geometry A that is closest to geometry B is the one that determines whether geometry B is fully included in the buffer zone of the extended distance of geometry A. We refer to this point as **P1**.
    2 
    3 So, we can simplify this problem as "**Is geometry B completely contained within the buffer zone of the extended distance from point P1?**" And the buffer zone of a point is a circle, and we only need to consider its radius. Under what circumstances does a circle contain a geometry? We call the point on geometry B that is farthest from point P1 as **P2**, and finally simplify the problem as "**Is the distance between P1 and P2 less than the distance?**".
    4 
    5 Finally, we can obtain the following equivalent formula:
    6 {{{ST_DFullyWithin(A, B, R) <=> ST_Contains(ST_Buffer(A, R), B) <=> ST_MaxDistance(ST_ClosestPoint(A, B), B) ≤ R}}}
    7 
    8 Sorry for the lengthy explanation, and thank you for your patience.