Opened 16 years ago
Closed 16 years ago
#178 closed defect (fixed)
ST_XMax() and ST_YMax() return incorrect values
Reported by: | mloskot | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | |
Component: | postgis | Version: | |
Keywords: | Cc: |
Description
For flipped-over 2D box with lower-left corner coordinates higher than coordinates of upper-right corner:
sistest=# SELECT ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0)); st_makebox2d -------------- BOX(5 5,0 0)
Min/Max functions report incorrect values:
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
Originally, I posted this issue to the mailing list asking if names of ST_MakeBox2D parameters are correct and eventually Mark confirmed that is a bug in Min/Max functions. It is in thread Name of ST_MakeBox2D parameters.
Note:
See TracTickets
for help on using tickets.
Thanks Mateusz. This is now resolved in SVN trunk:
postgis=# SELECT ST_XMin(ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0)));
(1 row)
postgis=# SELECT ST_XMax(ST_MakeBox2D(ST_Point(5, 5), ST_Point(0, 0)));
(1 row)
Due to the change in behaviour having the potential to effect existing applications, I don't intend to backport this to the 1.3 branch.
ATB,
Mark.