[postgis-devel] Impatient on 1.3.4

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Thu Oct 30 16:21:54 PDT 2008


Mark Cave-Ayland wrote:

> But this is not the case; Olivier submitted a patch for me to test which 
> fixes the decimal places within the regression tests, but he notes there 
> is still at least 1 failure. From Olivier's last email:
> 
> 
> On the other hand i'm not sure it will be enough,
> there was on your previous regress diff,
> differences on geojson bbox coordinates
> 
> multiline_03|{"type":"MultiLineString","bbox":[3429562,5795363,3434296,5799491]... 
> 
> versus
> multiline_03|{"type":"MultiLineString","bbox":[3429563,5795363,3434296,5799491]... 
> 
> 
> 
> So I would argue this still warrants further investigation.

Okay, I've got it. What was happening was that the GeoJSON code was 
using the embedded BOX2DFLOAT4 representations of the bounding boxes 
rather than calculating them for all geometries. Obviously there are 
some minor rounding issues between platforms in the conversion between 
double and float which was causing the bbox differences.

I've applied the fix for this to 1.3 branch and trunk (basically 
removing the use of BOX2DFLOAT4) and with this in place, the GeoJSON 
regression tests pass on both Win32 and Linux :)


ATB,

Mark.

-- 
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063



More information about the postgis-devel mailing list