From bc5180039f3be58bcac825647a501214d78ad152 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Thu, 1 Dec 2011 17:38:08 +0000 Subject: [PATCH] try to clarify accuracy etc. of <#> and <-> git-svn-id: http://svn.osgeo.org/postgis/trunk@8288 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_operator.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/reference_operator.xml b/doc/reference_operator.xml index f62b484a7..7dcd5c230 100644 --- a/doc/reference_operator.xml +++ b/doc/reference_operator.xml @@ -1096,13 +1096,13 @@ select 'LINESTRING(0 0, 1 1)'::geometry ~= 'LINESTRING(0 1, 1 0)'::geometry as e Description - The <-> operator returns squared distance between two points read from the spatial index for points. For - other geometries it returns squared distance from centroid of bounding box of geometries. Useful for doing nearest neighbor approximate distance ordering. + The <-> operator returns distance between two points read from the spatial index for points (float precision). For + other geometries it returns the distance from centroid of bounding box of geometries. Useful for doing nearest neighbor approximate distance ordering. This operand will make use of any indexes that may be available on the - geometries. It is different from other operators taht use spatial indexes in that the spatial index is only used when the operator + geometries. It is different from other operators that use spatial indexes in that the spatial index is only used when the operator is in the ORDER BY clause. - Index appears to only kick in with contants + Index only kicks in if one of the geometries is a constant (not in a subquery/cte). e.g. 'SRID=3005;POINT(1011102 450541)'::geometry instead of a.geom Availability: 2.0.0 only available for PostgreSQL 9.1+ @@ -1185,7 +1185,7 @@ Finally the hybrid: <#> - Returns the distance between bounding box of 2 geometries. For point / point checks it's same as distance. Useful for doing distance ordering and nearest neighbor limits + Returns the distance between bounding box of 2 geometries. For point / point checks it's almost the same as distance (though may be different since the bounding box is at floating point accuracy and geometries are double precision). Useful for doing distance ordering and nearest neighbor limits using KNN gist functionality. @@ -1212,12 +1212,12 @@ Finally the hybrid: Description - The <#> KNN GIST operator returns distance between two bounding boxes read from the spatial index if available. Useful for doing nearest neighbor approximate distance ordering. + The <#> KNN GIST operator returns distance between two floating point bounding boxes read from the spatial index if available. Useful for doing nearest neighbor approximate distance ordering. This operand will make use of any indexes that may be available on the geometries. It is different from other operators that use spatial indexes in that the spatial index is only used when the operator is in the ORDER BY clause. - Index appears to only kick in with contants + Index only kicks in if one of the geometries is a constant e.g. ORDER BY (ST_GeomFromText('POINT(1 2)') <#> geom) instead of g1.geom <#>. Availability: 2.0.0 only available for PostgreSQL 9.1+ -- 2.40.0