[postgis-devel] Name of ST_MakeBox2D parameters

Mateusz Loskot mateusz at loskot.net
Fri May 8 02:16:08 PDT 2009


Hi,

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

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net



More information about the postgis-devel mailing list