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

Paul Ramsey pramsey at cleverelephant.ca
Thu Feb 19 09:04:16 PST 2015


My preference was always to allow, for example, a 2d query box to extract a 3d column of data from a volume of points, and I would have implemented that way if I could. Now, what i cannot tell you, is why I felt I couldn’t…

P 


--  
http://postgis.net  
http://cleverelephant.ca


On February 19, 2015 at 8:46:22 AM, Sandro Santilli (strk at keybit.net) wrote:
> The current &&& operator assumes 0 as the value of dimensions that are
> missing from one of the operands.
>  
> This results in confusing behavior, like this:
>  
> select 'POINT(0 0)'::geometry &&& 'POINT(0 0 1)'::geometry; -- false
> select 'POINT(0 0)'::geometry &&& 'POINT(0 0 0)'::geometry; -- true
>  
> I think the above two selects should give the same answer instead.
> Possibilities are:
>  
> 1. Missing dimension is unknown, return NULL
> 2. Missing dimension is infinite, return true
> 3. Missing dimension is empty, return false
> 4. An impossible comparison was requested, raise exception
>  
> Which one would you prefer ?
> And what constraints do we have being the operator used by index scan ?
>  
> --strk;
>  
> () Free GIS & Flash consultant/developer
> /\ http://strk.keybit.net/services.html
>  




More information about the postgis-devel mailing list