<html>
<head>
        <title></title>
        
<meta name="GENERATOR" content="MSHTML 8.00.6001.18975"></meta>
</head>

<body>
        
<div align="left">Try St_Extent3D instead without st_collect. Then PostGIS can handle 1 point at a time and not all the 17 millions.</div>
        
<div align="left"> </div>
        
<div align="left">So try:</div>
        
<div align="left">SELECT ST_Extent3D(punkte) FROM rohdaten WHERE id=109;<br />
                </div>
        
<div align="left"> </div>
        
<div align="left">ConvexHull is only working in 2D. It will keep the third dimension but not include it in the calculations (not 100% sure about that, but almost)</div>
        
<div align="left"> </div>
        
<div align="left">HTH</div>
        
<div align="left"> </div>
        
<div align="left">Nicklas<br />
                <br />
                2010-10-20 Jan Saalbach wrote:<br />
                <br />
                Hi all,<br />
                >an "out of memory error" occurs when I issue the following command:<br />
                ><br />
                >SELECT BOX3D(ST_COLLECT(punkte)) FROM rohdaten WHERE id=109;<br />
                ><br />
                >"punkte" is a GeometryColumn filled with POINT3D, 17 million for id=109. <br />
                >The machine has 4GB of ram.<br />
                ><br />
                >I chose the box3d over the ConvexHull function because I thought it <br />
                >would be much faster, and much less memory consuming. Apparently I was <br />
                >wrong about memory consuming.<br />
                ><br />
                >What I do not get is why a computation as simple as "min x,y,z and max <br />
                >x,y,z all at once" should consume that much memory. Can someone explain <br />
                >to me what point I am missing?<br />
                ><br />
                >Issuing MIN(ST_X... MIN(ST_Y... commands one after another works fine <br />
                >and is quite fast.<br />
                ><br />
                >Regards,<br />
                >Jan<br />
                >_______________________________________________<br />
                >postgis-users mailing list<br />
                >postgis-users@postgis.refractions.net<br />
                >http://postgis.refractions.net/mailman/listinfo/postgis-users<br />
                ><br />
                > </div>
</body>
</html>