[postgis-users] Operator does not exist: <<#>>

Regina Obe lr at pcorp.us
Tue Dec 26 11:57:17 PST 2023


Just remembered <<#>> is for ND boxes, and we did take it out, recalling a convo pramsey had a long time ago.

 

But I think the comment still remains the same

 

This one - https://postgis.net/docs/manual-dev/en/geometry_distance_centroid_nd.html  used to just do centroid of the boxes and the other one was for distance of the boxes.

When we changed to true KNN, distance would always be better so we scrapped all the box distance variants and the centroid ones then all became true distance.  I think the comment about <<->> is now wrong and it should be true distance

 

e.g

 

 

SELECT ST_GeomFromText('MULTIPOINT(1 3 2, 0 0 0)') <<->> ST_GeomFromText('LINESTRING(1 1 1, 5 5 5)')  returns 1.4142135623730951

 

Which is the same answer as 

 

SELECT ST_3DDistance(ST_GeomFromText('MULTIPOINT(1 3 2, 0 0 0)'), ST_GeomFromText('LINESTRING(0 0 0, 5 5 5)'))

 

From: Regina Obe <lr at pcorp.us> 
Sent: Tuesday, December 26, 2023 2:46 PM
To: 'PostGIS Users Discussion' <postgis-users at lists.osgeo.org>
Cc: 'Dapeng Wang' <wangdapeng20191008 at gmail.com>
Subject: RE: [postgis-users] Operator does not exist: <<#>>

 

I concur doesn’t seem to exist.  I’m trying to think how that would ever have been different from <#>.

 

I recall there was a time before we had true KNN for geometry that one was for bounding box distance and one was for the centroid bounding box distance.

 

Anyway I’ll remove from the docs.  Thanks for catching.

 

Regina

 

From: postgis-users <postgis-users-bounces at lists.osgeo.org <mailto:postgis-users-bounces at lists.osgeo.org> > On Behalf Of Dapeng Wang via postgis-users
Sent: Monday, December 25, 2023 10:31 PM
To: postgis-users at lists.osgeo.org <mailto:postgis-users at lists.osgeo.org> 
Cc: Dapeng Wang <wangdapeng20191008 at gmail.com <mailto:wangdapeng20191008 at gmail.com> >
Subject: [postgis-users] Operator does not exist: <<#>>

 

Hello everyone,

SELECT st_distance(geom, 'SRID=4326;POINT(1 2)'::geometry)
FROM ne_110m_admin_0_countries
ORDER BY (ST_GeomFromText('POINT(1 2)') <<#>> geom)
operator does not exist: geometry <<#>> geometry
Reference https://postgis.net/docs/manual-dev/en/geometry_distance_box_nd.html


Checked the postgis.sql.in <http://postgis.sql.in>  source code definition and did not find this operator. Has it been abandoned?

Thanks,
Dapeng

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20231226/888c93ca/attachment.htm>


More information about the postgis-users mailing list