[postgis-users] Operator does not exist: <<#>>
Regina Obe
lr at pcorp.us
Tue Dec 26 20:05:27 PST 2023
See answers below. No trouble at all. Thanks for catching all these loose ends in the docs.
Much appreciated,
Regina
From: Dapeng Wang <wangdapeng20191008 at gmail.com>
Sent: Tuesday, December 26, 2023 10:26 PM
To: Regina Obe <lr at pcorp.us>
Cc: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: Re: [postgis-users] Operator does not exist: <<#>>
I get it, <<#>> is deprecated.
<<->>Supports 2D and 3D operations, shortest distance.
I also verified via SQL that <<->> is indeed the shortest distance.
There are 2 questions here,
1. The centroid algorithm disappears.
[Regina Obe] Yes this disappears, and is replaced with true distance
2. How to calculate bounding box distance used in 3D? Initially use <<#>>.
[Regina Obe] You’d have to cast, if you really wanted to, using geom::box3d, but in practice I don’t think it’s that useful to have bounding box distance. We had it because that was all we could get out of KNN at the time.
(Please don't increase the team's development time because of my question, I have no real application, just learning).
SELECT ST_GeomFromText('MULTIPOINT(1 3 2, 0 0 0)') <<->> ST_GeomFromText('LINESTRING(1 1 1, 5 5 5)') returns 1.4142135623730951
SELECT ST_3DDistance(ST_GeomFromText('MULTIPOINT(1 3 2, 0 0 0)'), ST_GeomFromText('LINESTRING(0 0 0, 5 5 5)'))
Haha, the LINESTRING data of the ST_3DDistance function should be LINESTRING(1 1 1, 5 5 5), which is unintentional.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20231226/0166fc93/attachment.htm>
More information about the postgis-users
mailing list