[postgis-devel] [PostGIS] #1200: st_estimated_extent returns bogus values
PostGIS
trac at osgeo.org
Mon Sep 19 06:51:52 PDT 2011
#1200: st_estimated_extent returns bogus values
----------------------+-----------------------------------------------------
Reporter: dmiranda | Owner: pramsey
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
----------------------+-----------------------------------------------------
Comment(by strk):
Ok, I think I've found the culprit. Box in histogram is 4 floats, we're
memcpying a GBOX instead, which is also much larger. Must have been the
effect of a copy&replace
{{{
/*
* Construct box2dfloat4.
* Must allocate this in upper executor context
* to keep it alive after SPI_finish().
*/
box = SPI_palloc(sizeof(GBOX));
/* Construct the box */
memcpy(box, ARR_DATA_PTR(array), sizeof(GBOX));
}}}
ARR_DATA_PTR(array) is a pointer to float4 values, we should cast to
BOX2DFLOAT4 and then _convert_ to GBOX eventually
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1200#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list