[postgis-devel] Conversion from box3d to box2d changes bounds
cfis at savagexi.com
Sat Sep 22 16:13:28 PDT 2007
> BOX2DFLOAT4 *
> box3d_to_box2df(BOX3D *box)
> result->xmin = nextDown_f(box->xmin);
> result->xmax = nextUp_f(box->xmax);
> Notice it *intentionally* changes the bounding box. I assume there is a
> good reason for this, but curious what it is.
Ah - its the double to float conversion. Ok - so envelope works now by
checking the bounds in 2d, using this method:
It seems that needs to change to use the 3d box as provided by this method:
This avoids the down-conversion and returns the correct results.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
More information about the postgis-devel