[postgis-users] st_equals strangeness
Paul Ramsey
pramsey at cleverelephant.ca
Fri Jan 8 09:50:54 PST 2010
Well, that brings us to the API level, no? Because operators have
meanings in index (32-bit) terms. Should all our operators have 64-bit
rechecks? Should some of them? Should '=' just get a special
treatment, because we have such an in-grained understanding of what
that symbol connotes, and other symbols be left as pure index ops?
P
On Fri, Jan 8, 2010 at 9:44 AM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Paul Ramsey wrote:
>
>> More to the point, it's a float32 box, not a double64 box. Your two
>> points are in fact different, waaaaaay down deep into the precision of
>> their 64-bit double coordinates. So deep in fact that the human
>> readable decimal representations don't show it (look at the hexewkb
>> output, and you'll see the differences, you should be able to do that,
>> points are small enough to eyeball in hex).
>>
>> So when the 32-bit box is extracted from the 64-bit doubles, the
>> points are identical at that level of precision and = returns true,
>> while st_equals working against the doubles does not.
>>
>> P
>
> Again, another demonstration as to why BOX2DFLOAT4s should never be used for
> calculations and only for internal "within" checks :(
>
>
> ATB,
>
> Mark.
>
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
>
> Sirius Labs: http://www.siriusit.co.uk/labs
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
More information about the postgis-users
mailing list