[postgis-devel] Name of ST_MakeBox2D parameters
Mateusz Loskot
Mateusz.Loskot at cadcorp.com
Fri May 8 05:04:14 PDT 2009
Mark Cave-Ayland wrote:
> Mateusz Loskot wrote:
>
> > In the manual for SVN trunk [1] it states that box constructor
> > accepts LowLeft/UpRight corners:
> >
> > box2d ST_MakeBox2D(geometry pointLowLeft, geometry pointUpRight);
> >
> > [1]
> > http://postgis.refractions.net/documentation/manual-svn/ST_MakeBox2D.html
> >
> > Is there any assumption regarding origin and orientation of coordinate
> > system?
> > Given sample queries below, I've found the name a little confusing:
> >
> > sistest=# SELECT ST_MakeBox2D(ST_Point(0, 0), ST_Point(5,5));
> > st_makebox2d
> > --------------
> > BOX(0 0,5 5)
> >
> > sistest=# SELECT ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0));
> > st_makebox2d
> > --------------
> > BOX(5 5,0 0)
> >
> > sistest=# SELECT ST_XMin(ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0)));
> > st_xmin
> > ---------
> > 5
> >
> > sistest=# SELECT ST_XMax(ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0)));
> > st_xmax
> > ---------
> > 0
>
>
> Hi Mateusz,
>
> I think that ST_MakeBox2D() is working correctly, and the bug is that
> ST_XMax() and ST_YMax() simply returns the relevant structure elements
> rather than the true maximum.
Hi Mark,
Thanks for confirmation.
> My gut feeling is that this is a bug; feel free to add it to the
> PostGIS tracker against 1.4.
Here we go: http://trac.osgeo.org/postgis/ticket/178
Best regards,
--
Mateusz Loskot
Senior Programmer, Cadcorp
http://www.cadcorp.com
More information about the postgis-devel
mailing list