Skip to content

Commit 001d36c

Browse files
no message
1 parent 9192d5f commit 001d36c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/GeometryDistance.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
* Implementation of PostGIS 2D distance between geometries operator (using <->).
99
*
1010
* Returns the 2D distance between A and B geometries.
11-
* This is different from the existing Distance class which uses <@> for point distance.
11+
* This differs from BoundingBoxDistance (using <#>), which measures distance between
12+
* bounding boxes only. The <-> operator is commonly used for KNN nearest-neighbor
13+
* ordering, and on PostgreSQL 9.5+ with PostGIS 2.2+ it returns true geometry distance;
14+
* on older stacks it behaved as a centroid-of-bounding-box distance approximation.
1215
*
13-
* @see https://postgis.net/docs/reference.html#Operators_Distance
16+
* @see https://postgis.net/docs/reference.html#Operators
17+
* @see https://postgis.net/docs/geometry_distance_knn.html
1418
* @since 3.5
1519
*
1620
* @author Martin Georgiev <martin.georgiev@gmail.com>

0 commit comments

Comments
 (0)