[postgis-devel] BBOX caches: float or double ?
Sandro Santilli
strk at keybit.net
Wed Nov 9 06:58:09 PST 2011
There seems to be some confusion about the BBOX cache format.
The liblwgeom/g_serialized.txt seems to suggest that BBOX caches
are using doubles, but code in liblwgeom/g_serialized.c use
floats. Who's right and who's wrong ?
Code using float:
static size_t gserialized_from_gbox(const GBOX *gbox, uint8_t *buf)
// rounds to nearest float
gserialized_read_gbox_p
// reads bbox as floats
Note that gserialized_read_gbox_p is supposed to return a GBOX but
given the confusion returns one based on doubles or on floats
depending on availability of the cache.
This is the reason for bug #1273, but can't imagine how many other
such bugs are hiding...
--strk;
() Free GIS & Flash consultant/developer
/\ http://strk.keybit.net/services.html
More information about the postgis-devel
mailing list