[postgis-devel] assumptions of &&& operator for missing dimensions

Rémi Cura remi.cura at gmail.com
Tue Feb 24 07:46:12 PST 2015


Hey,
I exploit this type of casting (2D-> 2D+always_true_1D) all the time,
it is extremely usefull.

I find it logical if you see things like this
A::geom3D
B::geom2D

3DDistance(A,B) -> type mismatch
2D->3D : not possible
3D->2D : drop Z

=> 3DDistance(A::geom2D,B::geom2D)

Cheers,
Rémi-C

2015-02-24 16:26 GMT+01:00 Even Rouault <even.rouault at spatialys.com>:

> Le mardi 24 février 2015 16:15:53, Sandro Santilli a écrit :
> > On Tue, Feb 24, 2015 at 08:09:26AM -0500, Paul Ramsey wrote:
> > > Well, the old semantic has been there since 2.0, which is a very long
> > > time. A further question for it would be: what do the next functions
> do?
> > > What does a distance calculation between a 2d and 3d object return?
> does
> > > it also respect that semantic?
> >
> > I just checked and ST_3DDistance is instead still confusing:
> > select ST_3DDistance('POINT Z (0 0 10)', 'POINT (0 0)'); -- 10
> > I think it should be 0 instead.
>
> As an uninformed observer, 10 or an error because of heterogenous
> dimensions
> would seem reasonable to me. But 0 would be very surprising !
>
> >
> > For the new <<->> and <<#>> operators I implemented the new semantic
> > (https://github.com/postgis/postgis/pull/34)
> >
> > --strk;
> > _______________________________________________
> > postgis-devel mailing list
> > postgis-devel at lists.osgeo.org
> > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20150224/70fd971c/attachment.html>


More information about the postgis-devel mailing list