Re: [postgis-users] Operator does not exist: <<#>>
See answers below. No trouble at all. Thanks for catching all these loose ends in the docs. Much appreciated, Regina From: Dapeng Wang Sent: Tuesday, December 26, 2023 10:26 PM To: Regina Obe Cc: PostGIS Users Discussion 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. ___ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users
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. 2. How to calculate bounding box distance used in 3D? Initially use <<#>>. (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. ___ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users
Re: [postgis-users] Operator does not exist: <<#>>
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 Sent: Tuesday, December 26, 2023 2:46 PM To: 'PostGIS Users Discussion' Cc: 'Dapeng Wang' 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 mailto:postgis-users-boun...@lists.osgeo.org> > On Behalf Of Dapeng Wang via postgis-users Sent: Monday, December 25, 2023 10:31 PM To: postgis-users@lists.osgeo.org <mailto:postgis-users@lists.osgeo.org> Cc: Dapeng Wang mailto:wangdapeng20191...@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 ___ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users
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 On Behalf Of Dapeng Wang via postgis-users Sent: Monday, December 25, 2023 10:31 PM To: postgis-users@lists.osgeo.org Cc: Dapeng Wang 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 ___ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users
[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 source code definition and did not find this operator. Has it been abandoned? Thanks, Dapeng ___ postgis-users mailing list postgis-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/postgis-users
[postgis-users] operator does not exist
Hi, When using pg_restore, I get this error: pg_restore: [archiver (db)] could not execute query: ERROR: operator does not exist: public.geometry public.geometry LINE 1: SELECT $1 $2 AND _ST_Overlaps($1,$2) I don't understand since \do returns: public || geometry | geometry | boolean | I just did install pg 9.3 + postgis 2.1 on a server and trying to use dumps from pg 9.1 + postgis 2.0. Any idea? Thanks a lot! Denis ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
Re: [postgis-users] operator does not exist
Hi Sandro, Thanks a lot for your reply. It did works perfectly well. Cheers, Denis On 22. 01. 14 12:11, Sandro Santilli wrote: On Wed, Jan 22, 2014 at 11:52:30AM +0100, Denis Rouzaud wrote: Hi, When using pg_restore, I get this error: pg_restore: [archiver (db)] could not execute query: ERROR: operator does not exist: public.geometry public.geometry LINE 1: SELECT $1 $2 AND _ST_Overlaps($1,$2) I don't understand since \do returns: public || geometry | geometry | boolean | I just did install pg 9.3 + postgis 2.1 on a server and trying to use dumps from pg 9.1 + postgis 2.0. You shouldn't use pg_restore but postgis_restore.pl. See Hard upgrade section in the manual. --strk; ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users