Opened 13 years ago
Closed 13 years ago
#1000 closed defect (fixed)
box3d_extent output is 2d, casted to box3d makes up random numbers
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | boxes | Cc: | simoc |
Description
create table test (g geometry); insert into test values ('POINT(0 0)'); insert into test values ('POINT(10 10)'); select st_extent(g) from test; BOX(0 0,10 10) select st_extent(g)::box3d from test; BOX3D(0 0 6.90298898654887e-310,10 10 6.90298898647219e-310)
Change History (3)
comment:1 by , 13 years ago
Cc: | added |
---|
comment:2 by , 13 years ago
Thanks for the report. This looks like a particular solution, however I would much rather like to change the patch like this:
out→zmin = in→zmin; out→zmax = in→zmax;
And then ensure that zmax/zmin are set to zero when the box3d_extent is created. If you could rework your patch in this way then I am happy to review and commit it.
Note:
See TracTickets
for help on using tickets.
Problem is that struct returned to SQL from C function BOX3D_extent_to_BOX3D() is not fully initialised.
Solution is to add two lines to this C function. A diff of the required changes is:
I am working with the current SVN revision 7429 postgis-2.0.0SVN.tar.gz source.
Can someone with commit access please commit this change.