[postgis-users] extent changed a little in rc3

strk at refractions.net strk at refractions.net
Fri Mar 11 08:50:40 PST 2005


On Fri, Mar 11, 2005 at 05:40:24PM +0100, Bernhard Herzog wrote:
> 
> I've finally found some time to test the postgis 1.0.0rc3 with Thuban.
> The test suite stumbled over a change in the return value of the extent
> function.  The return value has fewer digits in the coordinates of the
> bounding box and they now differ enough from the values expected by the
> test cases to make some tests fail.  

We changed that to avoid bug reports stating "output box is not the same
of input box". The box your obtaining is actually correct, it's the output
representation which has less digits then before (change introduced in RC3).
As long as you're not ascii-transferring the box the overlap test should
still hold. Try:

	SELECT
		extent('POINT(1.0000001 2.0000002)') &&
		'POINT(1.0000001 2.0000002)'::geometry;

--strk;

> 
> I think the new code returns too few digits, since it now gives an
> extent for a single point that does not contain the point.  For example
> with rc2 I get:
> 
> select extent('POINT(1.0000001 2.0000002)'::geometry);
>                    extent                   
> --------------------------------------------
>  BOX(1 2,1.00000011920929 2.00000023841858)
> 
> 
> This clearly contains the point (even though the coordinates cannot be
> represented exactly in binary floating point).  However, with with rc3:
> 
> select extent('POINT(1.0000001 2.0000002)'::geometry);
>     extent    
> --------------
>  BOX(1 2,1 2)
> 
> 
> This box doesn't contain the original point.
> 
>    Bernhard
> 
> 
> -- 
> Intevation GmbH                                 http://intevation.de/
> Skencil                                           http://skencil.org/
> Thuban                                  http://thuban.intevation.org/
> _______________________________________________
> 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