[postgis-users] postgis-users Digest, Vol 91, Issue 5

William Temperley willtemperley at gmail.com
Sat Jan 9 03:58:12 PST 2010


> 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.
>

Thanks for this. I hadn't realized geom = geom was a bounding box
comparison.

Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100109/1ce9c671/attachment.html>


More information about the postgis-users mailing list