[postgis-devel] RC5 problem
strk at refractions.net
strk at refractions.net
Sat Mar 26 11:04:44 PST 2005
This should be the behaviour since RC1.
Note that box3d is double precision, while box2d is
single precision. So you can choose which one to use.
Example:
strk=# select xmin('POINT(1.0000000001 0)'::geometry::box3d);
xmin
--------------
1.0000000001
(1 row)
strk=# select xmin('POINT(1.0000000001 0)'::geometry::box2d);
xmin
------
1
(1 row)
Also note that geometry::box3d always *computes* the bounding
box while geometry::box2d uses the bbox cache if available
(which is the single-precision version).
--strk;
On Sat, Mar 26, 2005 at 11:34:16AM -0500, Carl Anderson wrote:
>
> not sure when this came up, I did not try other recent RC's
>
> select xmin(<geometry>);
> is confused by the parallel IMPLICIT casts from geometry to BOX2d and BOX3d
> and the existence of
> xmin(box2d)
> and
> xmin(box3d)
>
> additional IMPLICIT casts
> box2d(box3d)
> box3d(box2d)
>
> the IMPLICIT casts seem potentially circular, wherein it might become
> impossible to
> clearly understand what chain of casts occurred and in what order.
>
> select xmin(geometry('POINT(0 0)'));
> select xmin('POINT(0 0)'::geometry);
> ERROR: function xmin(geometry) is not unique
> HINT: Could not choose a best candidate function. You may need to
> add explicit type casts.
>
>
> these are ok
> select xmin('POINT(0 0)'::geometry::box2d);
> select xmin('POINT(0 0)'::geometry::box3d);
> select xmin('POINT(0 0)'::geometry::box3d::box2d);
> select xmin('POINT(0 0)'::geometry::box2d::box3d);
>
> C.
>
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
More information about the postgis-devel
mailing list